Gathering detailed insights and metrics for confbox
Gathering detailed insights and metrics for confbox
Gathering detailed insights and metrics for confbox
Gathering detailed insights and metrics for confbox
Compact YAML, TOML, JSONC and JSON5 and INI parser and serializer
npm install confbox
Typescript
Module System
Node Version
NPM Version
99.4
Supply Chain
99.1
Quality
78.8
Maintenance
100
Vulnerability
87.6
License
TypeScript (83.28%)
JavaScript (16.72%)
Total Downloads
286,456,168
Last Day
500,852
Last Week
9,469,123
Last Month
39,241,151
Last Year
273,937,022
NOASSERTION License
263 Stars
89 Commits
2 Forks
2 Watchers
2 Branches
18 Contributors
Updated on Jun 24, 2025
Latest Version
0.2.2
Package Id
confbox@0.2.2
Unpacked Size
131.63 kB
Size
38.72 kB
File Count
18
NPM Version
10.9.2
Node Version
22.14.0
Published on
Apr 03, 2025
Cumulative downloads
Total Downloads
Last Day
7.1%
500,852
Compared to previous day
Last Week
-4.2%
9,469,123
Compared to previous week
Last Month
9.4%
39,241,151
Compared to previous month
Last Year
2,088.1%
273,937,022
Compared to previous year
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:
1# ✨ Auto-detect 2npx nypm install confbox 3 4# npm 5npm install confbox 6 7# yarn 8yarn add confbox 9 10# pnpm 11pnpm install confbox 12 13# bun 14bun install confbox 15 16# deno 17deno install confbox
Import:
ESM (Node.js, Bun, Deno)
1import { 2 parseJSON5, 3 stringifyJSON5, 4 parseJSONC, 5 stringifyJSONC, 6 parseYAML, 7 stringifyYAML, 8 parseJSON, 9 stringifyJSON, 10 parseTOML, 11 stringifyTOML, 12 parseINI, 13 stringifyINI, 14} from "confbox";
CDN (Deno, Bun and Browsers)
1import { 2 parseJSON5, 3 stringifyJSON5, 4 parseJSONC, 5 stringifyJSONC, 6 parseYAML, 7 stringifyYAML, 8 parseJSON, 9 stringifyJSON, 10 parseTOML, 11 stringifyTOML, 12 parseINI, 13 stringifyINI, 14} 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
No vulnerabilities found.
No security vulnerabilities found.