
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
Parsing and serialization utils for YAML (js-yaml), TOML (smol-toml), JSONC (jsonc-parser), JSON5 (json5), INI (ini) and JSON.
✨ Zero dependency and tree-shakable
✨ Types exported out of the box
✨ Preserves code style (indentation and whitespace)
[!TIP] Use unjs/c12 for a full featured configuration loader!
Install package:
# ✨ Auto-detect
npx nypm install confbox
# npm
npm install confbox
# yarn
yarn add confbox
# pnpm
pnpm install confbox
# bun
bun install confbox
# deno
deno install confbox
Import:
ESM (Node.js, Bun, Deno)
import {
parseJSON5,
stringifyJSON5,
parseJSONC,
stringifyJSONC,
parseYAML,
stringifyYAML,
parseJSON,
stringifyJSON,
parseTOML,
stringifyTOML,
parseINI,
stringifyINI,
} from "confbox";
CDN (Deno, Bun and Browsers)
import {
parseJSON5,
stringifyJSON5,
parseJSONC,
stringifyJSONC,
parseYAML,
stringifyYAML,
parseJSON,
stringifyJSON,
parseTOML,
stringifyTOML,
parseINI,
stringifyINI,
} from "https://esm.sh/confbox";
parseINI(text, options?)Converts an INI string into an object.
Note: Style and indentation are not preserved currently.
parseJSON(text, options?)Converts a JSON string into an object.
Indentation status is auto-detected and preserved when stringifying back using stringifyJSON
parseJSON5(text, options?)Converts a JSON5 string into an object.
parseJSONC(text, options?)Converts a JSONC string into an object.
parseTOML(text)Converts a TOML string into an object.
parseYAML(text, options?)Converts a YAML string into an object.
stringifyINI(value, options?)Converts a JavaScript value to an INI string.
Note: Style and indentation are not preserved currently.
stringifyJSON(value, options?)Converts a JavaScript value to a JSON string.
Indentation status is auto detected and preserved when using value from parseJSON.
stringifyJSON5(value, options?)Converts a JavaScript value to a JSON5 string.
stringifyJSONC(value, options?)Converts a JavaScript value to a JSONC string.
stringifyTOML(value)Converts a JavaScript value to a TOML string.
stringifyYAML(value, options?)Converts a JavaScript value to a YAML string.
Published under the MIT license.
Made by @pi0 and community 💛
🤖 auto updated with automd
FAQs
Compact YAML, TOML, JSONC, JSON5 and INI parser and serializer
The npm package confbox receives a total of 10,554,029 weekly downloads. As such, confbox popularity was classified as popular.
We found that confbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.