Socket
Socket
Sign inDemoInstall

confbox

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

5

package.json
{
"name": "confbox",
"version": "0.1.1",
"version": "0.1.2",
"description": "Compact and high quality YAML, TOML, JSONC and JSON5 parsers",

@@ -66,3 +66,3 @@ "keywords": [

"@vitest/coverage-v8": "^1.3.0",
"automd": "^0.3.0",
"automd": "^0.3.2",
"changelogen": "^0.5.5",

@@ -78,2 +78,3 @@ "eslint": "^8.56.0",

"prettier": "^3.2.5",
"smol-toml": "^1.1.4",
"toml": "^3.0.0",

@@ -80,0 +81,0 @@ "typescript": "^5.3.3",

87

README.md
# confbox
<!-- automd:badges -->
<!-- automd:badges color=yellow no-npmDownloads bundlephobia packagephobia -->
[![npm version](https://flat.badgen.net/npm/v/confbox)](https://npmjs.com/package/confbox)
[![npm downloads](https://flat.badgen.net/npm/dm/confbox)](https://npmjs.com/package/confbox)
[![npm version](https://flat.badgen.net/npm/v/confbox?color=yellow)](https://npmjs.com/package/confbox)
[![bundle size](https://flat.badgen.net/bundlephobia/minzip/confbox?color=yellow)](https://bundlephobia.com/package/confbox)
[![install size](https://flat.badgen.net/packagephobia/publish/confbox?color=yellow)](https://packagephobia.com/result?p=confbox)

@@ -14,3 +15,3 @@ <!-- /automd -->

✅ [TOML](https://toml.io/) (with [`toml`](https://github.com/BinaryMuse/toml-node)
✅ [TOML](https://toml.io/) (with [`smol-toml`](https://github.com/squirrelchat/smol-toml))

@@ -23,8 +24,12 @@ ✅ [JSONC](https://github.com/microsoft/node-jsonc-parser) (with [`jsonc-parser`](https://github.com/microsoft/node-jsonc-parser))

✨ Types exported out of the box <br>
✨ Zero config and compact redistribution <br>
✨ Dual ESM/CJS build <br>
✨ Consistent and tested API <br>
✨ Handpicked best libraries (bundle+perf) <br>
✨ Types exported out of the box
✨ Zero config and compact redistribution
✨ Dual ESM/CJS build
✨ Consistent and tested API
✨ Handpicked best libraries (bundle+perf)
> [!NOTE]

@@ -60,28 +65,42 @@ > Use [unjs/c12](https://github.com/unjs/c12) for a full featured configuration loader!

<!-- automd:jsimport cjs cdn src="./src/index.ts" -->
**ESM** (Node.js, Bun)
```js
// ESM (tree-shakable)
import {
parseJSON5,
parseJSONC,
parseTOML,
parseYAML,
stringifyYAML,
parseTOML,
} from "confbox";
```
// Using individual builds
import { parseYAML, stringifyYAML } from "confbox/yaml";
import { parseTOML } from "confbox/toml";
import { parseJSON5 } from "confbox/json5";
import { parseJSONC } from "confbox/jsonc";
**CommonJS** (Legacy Node.js)
// CommonJS
```js
const {
parseJSON5,
parseJSONC,
parseTOML,
parseYAML,
stringifyYAML,
parseTOML,
} = require("confbox");
```
**CDN** (Deno, Bun and Browsers)
```js
import {
parseJSON5,
parseJSONC,
parseYAML,
stringifyYAML,
parseTOML,
} from "https://esm.sh/confbox";
```
<!-- /automd -->
<!-- automd:jsdocs src="./src/index" -->

@@ -111,4 +130,9 @@

## Development
<!-- automd:fetch url="gh:unjs/.github/main/snippets/readme-contrib-node-pnpm.md" -->
## Contribution
<details>
<summary>Local development</summary>
- Clone this repository

@@ -118,8 +142,27 @@ - Install the latest LTS version of [Node.js](https://nodejs.org/en/)

- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`
- Run tests using `pnpm dev` or `pnpm test`
</details>
<!-- /automd -->
## License
Made with 💛
<!-- automd:contributors license=MIT author=pi0 -->
Published under [MIT License](./LICENSE).
Published under the [MIT](https://github.com/unjs/confbox/blob/main/LICENSE) license.
Made by [@pi0](https://github.com/pi0) and [community](https://github.com/unjs/confbox/graphs/contributors) 💛
<br><br>
<a href="https://github.com/unjs/confbox/graphs/contributors">
<img src="https://contrib.rocks/image?repo=unjs/confbox" />
</a>
<!-- /automd -->
<!-- automd:with-automd -->
---
_🤖 auto updated with [automd](https://automd.unjs.io) (last updated: Tue Feb 20 2024)_
<!-- /automd -->

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc