GitXplorerGitXplorer
k

json-bond

public
14 stars
0 forks
12 issues

Commits

List of commits on branch master.
Unverified
ef6aebcb64f68eb4bfcb992fb7982678a5f4d0e7

Fix Makefile for Linux

kkossnocorp committed 4 years ago
Unverified
456f9d50db140f3e8efa52800a389ca5616a2554

Use String instead of custom type

kkossnocorp committed 4 years ago
Unverified
404c43103fbcbbd1dafdee5fc5b14c39184def5b

Fix README

kkossnocorp committed 5 years ago
Unverified
9278e625f4ce390f99d11843aa19e7fd928883ab

JsonBond → JSONBond

kkossnocorp committed 5 years ago
Unverified
642a99336e9032b8d7dc2058019cd15a7b9f2e7f

Hello, cruel world!

kkossnocorp committed 5 years ago

README

The README file for this repository.

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