{"_id":"confbox@0.3.2","dist":{"shasum":"47ad0467206bb636ca161e1ec46f9ae01999bc89","tarball":"http://registry-npm.ywwl.com/confbox/download/confbox-0.3.2.tgz","fileCount":28,"integrity":"sha512-ZUAKhKlkCOrIGKc8cj7zek9s9z1mveHif/25nUshI2BzCRzF7KH7KHa+Lnh2ubq+e1tIlaFuP763mzW4qVoehg==","signatures":[{"sig":"MEYCIQCH0g9BsCHicwGtiob6VoB+IRn/hVBC+GlNIU8P4MjYhwIhAOg/UoGXCtD0B9B5o7nTJ9hPpGfkQgkRdimFH0vBwbcQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGvDS2OR8rAK03n0dvRfKl8Up38LrYJbW5qRhFyGfJgbAiEAt/c+I1y3oE4zKyesDWWeBQSuN89MAYbMs3Hoj+iR0vQ="}],"unpackedSize":132864,"size":44423,"noattachment":false,"key":"/confbox/-/confbox-0.3.2.tgz"},"name":"confbox","type":"module","types":"./dist/index.d.mts","exports":{".":"./dist/index.mjs","./ini":"./dist/ini.mjs","./json":"./dist/json.mjs","./toml":"./dist/toml.mjs","./yaml":"./dist/yaml.mjs","./json5":"./dist/json5.mjs","./jsonc":"./dist/jsonc.mjs"},"license":"MIT","scripts":{"dev":"vitest dev --coverage","lint":"oxlint && oxfmt --check src test","test":"pnpm lint && pnpm test:types && vitest run --coverage","bench":"pnpm build && node test/bench.mjs","build":"obuild","release":"pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags","lint:fix":"oxlint --fix && oxfmt src test","test:types":"tsc --noEmit --skipLibCheck"},"version":"0.3.2","_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"keywords":["config","ini","json5","jsonc","toml","unjs","yaml"],"repository":{"url":"unjs/confbox","type":"git"},"description":"Compact YAML, TOML, JSONC, JSON5 and INI parser and serializer","directories":{},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.22.1","_hasShrinkwrap":false,"devDependencies":{"ini":"^7.0.0","jiti":"^2.7.0","toml":"^5.0.1","yaml":"^2.9.1","json5":"^2.2.3","oxfmt":"^0.75.0","automd":"^0.4.3","mitata":"^1.0.34","obuild":"^0.4.45","oxlint":"^1.90.0","vitest":"^5.0.5","js-toml":"^2.0.1","js-yaml":"^5.5.0","smol-toml":"^1.9.1","@types/ini":"^4.1.1","typescript":"^7.0.2","@types/node":"^26.6.5","changelogen":"^0.6.2","jsonc-parser":"^3.3.1","detect-indent":"^7.0.2","@vitest/coverage-v8":"^5.0.5","strip-json-comments":"^5.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/confbox_0.3.2_1793270029797_0.508594900251514"},"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":1793270029890,"_cnpm_publish_time":1793270029890,"dist-tags":{"latest":"0.3.2"}}