Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

json-type-check

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-type-check

A typechecker for JSON


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created

json-type-check

A typechecker for JSON

Build Status Code Climate Code Coverage
import Jst from 'json-type-check'

const ruleset = {
  requiedString: [
    Jst.string,
    Jst.required
  ],
  optionalInteger: Jst.integer,
  optionalDate: Jst.date,
  optionalEnum: Jst.oneOf([
    Jst.integer,
    Jst.string
  ]),
  optionalObjectWithShape: Jst.shape([
    foo: Jst.integer,
    bar: Jst.string,
    baz: Jst.sfunc
  ])
}

const check = new Jst(options, ruleset)

FAQs

Package last updated on 10 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts