json-bond
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

JSON bond

JSON bond provides a way to add type-safety to JSON strings.

Installation

The library is available as an npm package. To install JSON bond, run:

npm install json-bond --save
# Or using Yarn:
yarn add json-bond

Usage

import { JSONBond, parse, stringify } from 'json-bond'

type Abc = { [char: string]: number }
const abc: Abc = { a: 1, b: 2 }

const json = stringify(abc)
//=> JSONBond<Abc>

const result = parse(json)
//=> Abc

Changelog

See the changelog.

License

MIT © Sasha Koss

Readme

Keywords

Package Sidebar

Install

npm i json-bond

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.6 kB

Total Files

6

Last publish

Collaborators

  • kossnocorp