JSON Schema

JSON schema for package.json.

Usage

var schema = require( '@stdlib/_tools/package-json/schema' );

schema()

Returns a JSON schema for package.json.

var json = schema();
// returns <Object>

Examples

var Ajv = require( 'ajv' );
var schema = require( '@stdlib/_tools/package-json/schema' );

var pkg = require( './package.json' );
var ajv = new Ajv();

var bool = ajv.validate( schema(), pkg );
var errs = ajv.errors;