{"name":"confbox","version":"0.2.4","description":"Compact YAML, TOML, JSONC, JSON5 and INI parser and serializer","keywords":["config","ini","json5","jsonc","toml","unjs","yaml"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/confbox.git"},"type":"module","sideEffects":false,"types":"./dist/index.d.mts","exports":{".":"./dist/index.mjs","./ini":"./dist/ini.mjs","./json5":"./dist/json5.mjs","./jsonc":"./dist/jsonc.mjs","./toml":"./dist/toml.mjs","./yaml":"./dist/yaml.mjs"},"scripts":{"build":"obuild","dev":"vitest dev --coverage","bench":"pnpm build && node test/bench.mjs","lint":"oxlint && oxfmt --check src test","lint:fix":"oxlint --fix && oxfmt src test","prepack":"pnpm build","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsgo --noEmit --skipLibCheck"},"devDependencies":{"@types/ini":"^4.1.1","@types/js-yaml":"^4.0.9","@types/node":"^25.2.1","@typescript/native-preview":"7.0.0-dev.20260206.1","@vitest/coverage-v8":"^4.0.18","automd":"^0.4.3","changelogen":"^0.6.2","detect-indent":"^7.0.2","ini":"^6.0.0","jiti":"^2.6.1","js-toml":"^1.0.2","js-yaml":"^4.1.1","json5":"^2.2.3","jsonc-parser":"^3.3.1","mitata":"^1.0.34","obuild":"^0.4.26","oxfmt":"^0.28.0","oxlint":"^1.43.0","smol-toml":"^1.6.0","toml":"^3.0.0","typescript":"^5.9.3","vitest":"^4.0.18","yaml":"^2.8.2"},"packageManager":"pnpm@10.28.2","gitHead":"e9b08c0f0a5eb7993245e450f0be1c89bb7f8a70","_id":"confbox@0.2.4","bugs":{"url":"https://github.com/unjs/confbox/issues"},"homepage":"https://github.com/unjs/confbox#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==","shasum":"592e7be71f882a4a874e3c88f0ac1ef6f7da1ce5","tarball":"http://registry-npm.ywwl.com/confbox/download/confbox-0.2.4.tgz","fileCount":26,"unpackedSize":137033,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDVS8Tv16Z3Ax22hOngLMW53B9j3L0WXX+pZeEV+nBjIAIgC03u2PFpfx9MADe/Ngnf/hRWpQae7nn9o/jtkTjYq0Y="}],"size":40812,"noattachment":false,"key":"/confbox/-/confbox-0.2.4.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/confbox_0.2.4_1770379902406_0.5802906138883535"},"_hasShrinkwrap":false,"readme":"# confbox\n\n<!-- automd:badges color=yellow bundlephobia packagephobia -->\n\n[![npm version](https://img.shields.io/npm/v/confbox?color=yellow)](https://npmjs.com/package/confbox)\n[![npm downloads](https://img.shields.io/npm/dm/confbox?color=yellow)](https://npm.chart.dev/confbox)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/confbox?color=yellow)](https://bundlephobia.com/package/confbox)\n[![install size](https://badgen.net/packagephobia/install/confbox?color=yellow)](https://packagephobia.com/result?p=confbox)\n\n<!-- /automd -->\n\nParsing and serialization utils for [YAML](https://yaml.org/) ([js-yaml](https://github.com/nodeca/js-yaml)), [TOML](https://toml.io/) ([smol-toml](https://github.com/squirrelchat/smol-toml)), [JSONC](https://github.com/microsoft/node-jsonc-parser) ([jsonc-parser](https://github.com/microsoft/node-jsonc-parser)), [JSON5](https://json5.org/) ([json5](https://github.com/json5/json5)), [INI](https://en.wikipedia.org/wiki/INI_file) ([ini](https://www.npmjs.com/package/ini)) and [JSON](https://www.json.org/json-en.html).\n\n✨ Zero dependency and tree-shakable\n\n✨ Types exported out of the box\n\n✨ Preserves code style (indentation and whitespace)\n\n> [!TIP]\n> Use [unjs/c12](https://github.com/unjs/c12) for a full featured configuration loader!\n\n## Usage\n\nInstall package:\n\n<!-- automd:pm-i no-version -->\n\n```sh\n# ✨ Auto-detect\nnpx nypm install confbox\n\n# npm\nnpm install confbox\n\n# yarn\nyarn add confbox\n\n# pnpm\npnpm add confbox\n\n# bun\nbun install confbox\n\n# deno\ndeno install npm:confbox\n```\n\n<!-- /automd -->\n\nImport:\n\n<!-- automd:jsimport cdn src=\"./src/index.ts\" -->\n\n**ESM** (Node.js, Bun, Deno)\n\n```js\nimport {\n  parseJSON5,\n  stringifyJSON5,\n  parseJSONC,\n  stringifyJSONC,\n  parseYAML,\n  stringifyYAML,\n  parseJSON,\n  stringifyJSON,\n  parseTOML,\n  stringifyTOML,\n  parseINI,\n  stringifyINI,\n} from \"confbox\";\n```\n\n**CDN** (Deno and Browsers)\n\n```js\nimport {\n  parseJSON5,\n  stringifyJSON5,\n  parseJSONC,\n  stringifyJSONC,\n  parseYAML,\n  stringifyYAML,\n  parseJSON,\n  stringifyJSON,\n  parseTOML,\n  stringifyTOML,\n  parseINI,\n  stringifyINI,\n} from \"https://esm.sh/confbox\";\n```\n\n<!-- /automd -->\n\n<!-- automd:jsdocs src=\"./src/index\" -->\n\n### `parseINI(text, options?)`\n\nConverts an [INI](https://www.ini.org/ini-en.html) string into an object.\n\n**Note:** Style and indentation are not preserved currently.\n\n### `parseJSON(text, options?)`\n\nConverts a [JSON](https://www.json.org/json-en.html) string into an object.\n\nIndentation status is auto-detected and preserved when stringifying back using `stringifyJSON`\n\n### `parseJSON5(text, options?)`\n\nConverts a [JSON5](https://json5.org/) string into an object.\n\n### `parseJSONC(text, options?)`\n\nConverts a [JSONC](https://github.com/microsoft/node-jsonc-parser) string into an object.\n\n### `parseTOML(text)`\n\nConverts a [TOML](https://toml.io/) string into an object.\n\n### `parseYAML(text, options?)`\n\nConverts a [YAML](https://yaml.org/) string into an object.\n\n### `stringifyINI(value, options?)`\n\nConverts a JavaScript value to an [INI](https://www.ini.org/ini-en.html) string.\n\n**Note:** Style and indentation are not preserved currently.\n\n### `stringifyJSON(value, options?)`\n\nConverts a JavaScript value to a [JSON](https://www.json.org/json-en.html) string.\n\nIndentation status is auto detected and preserved when using value from parseJSON.\n\n### `stringifyJSON5(value, options?)`\n\nConverts a JavaScript value to a [JSON5](https://json5.org/) string.\n\n### `stringifyJSONC(value, options?)`\n\nConverts a JavaScript value to a [JSONC](https://github.com/microsoft/node-jsonc-parser) string.\n\n### `stringifyTOML(value)`\n\nConverts a JavaScript value to a [TOML](https://toml.io/) string.\n\n### `stringifyYAML(value, options?)`\n\nConverts a JavaScript value to a [YAML](https://yaml.org/) string.\n\n<!-- /automd -->\n\n<!-- automd:fetch url=\"gh:unjs/.github/main/snippets/readme-contrib-node-pnpm.md\" -->\n\n## Contribution\n\n<details>\n  <summary>Local development</summary>\n\n- Clone this repository\n- Install the latest LTS version of [Node.js](https://nodejs.org/en/)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Run tests using `pnpm dev` or `pnpm test`\n\n</details>\n\n<!-- /automd -->\n\n## License\n\n<!-- automd:contributors license=MIT author=pi0 -->\n\nPublished under the [MIT](https://github.com/unjs/confbox/blob/main/LICENSE) license.\nMade by [@pi0](https://github.com/pi0) and [community](https://github.com/unjs/confbox/graphs/contributors) 💛\n<br><br>\n<a href=\"https://github.com/unjs/confbox/graphs/contributors\">\n<img src=\"https://contrib.rocks/image?repo=unjs/confbox\" />\n</a>\n\n<!-- /automd -->\n\n<!-- automd:with-automd -->\n\n---\n\n_🤖 auto updated with [automd](https://automd.unjs.io)_\n\n<!-- /automd -->\n","publish_time":1770379902581,"_cnpm_publish_time":1770379902581,"dist-tags":{"latest":"0.3.2"}}