https://github.com/blackglory/brave-json
🌿
https://github.com/blackglory/brave-json
browser esm library nodejs typescript
Last synced: 2 months ago
JSON representation
🌿
- Host: GitHub
- URL: https://github.com/blackglory/brave-json
- Owner: BlackGlory
- License: mit
- Created: 2023-12-27T11:21:16.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-28T02:34:01.000Z (over 1 year ago)
- Last Synced: 2025-10-19T21:50:06.512Z (9 months ago)
- Topics: browser, esm, library, nodejs, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/brave-json
- Size: 128 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# brave-json
## Install
```sh
npm install --save brave-json
# or
yarn add brave-json
```
## API
### BraveJSON
```ts
interface IConverter {
toJSON(value: Raw): JSON
fromJSON(value: JSON): Raw
}
class BraveJSON {
static readonly DEFAULT_SYMBOL = '$brave-json'
constructor(
converter: IConverter
, options?: { symbol?: string = BraveJSON.DEFAULT_SYMBOL }
)
stringify(value: unknown, space?: string | number): string
parse(text: string): T
}
```