# brave-json

> ```sh npm install --save brave-json # or yarn add brave-json ```

Latest version **0.2.1** (published 2024-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install brave-json
pnpm add brave-json
yarn add brave-json
bun add brave-json
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2024-12-28 |
| First published | 2018-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.17.0 |
| Dependencies | 1 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | BlackGlory |
| Maintainers | black_glory |

## Links

- npm: https://www.npmjs.com/package/brave-json
- Repository: https://github.com/BlackGlory/brave-json
- Homepage: https://github.com/BlackGlory/brave-json#readme
- Issues: https://github.com/BlackGlory/brave-json/issues
- npm.io page: https://npm.io/package/brave-json

## Dependencies (1)

- [@blackglory/prelude](https://npm.io/package/@blackglory/prelude.md) ^0.3.4

## Recent versions

- 0.2.1 (latest) — 2024-12-28
- 0.2.0 — 2023-12-27
- 0.1.5 — 2018-05-28
- 0.1.4 — 2018-05-28
- 0.1.3 — 2018-05-24
- 0.1.2 — 2018-05-24
- 0.1.1 — 2018-05-15
- 0.1.0 — 2018-05-14

## README

# brave-json
## Install
```sh
npm install --save brave-json
# or
yarn add brave-json
```

## API
### BraveJSON
```ts
interface IConverter<Raw, JSON extends JSONValue = JSONValue> {
  toJSON(value: Raw): JSON
  fromJSON(value: JSON): Raw
}

class BraveJSON {
  static readonly DEFAULT_SYMBOL = '$brave-json'

  constructor(
    converter: IConverter<unknown, JSONValue>
  , options?: { symbol?: string = BraveJSON.DEFAULT_SYMBOL }
  )

  stringify(value: unknown, space?: string | number): string
  parse<T>(text: string): T
}
```

---
_Source: https://npm.io/package/brave-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
