starkjs-schema-filter

0.0.3 • Public • Published

starkjs-schema-filter

JSON Schema filter to "cut" and "cast" data befor validating.

Getting Started

Install the module with: npm install starkjsSchemaFilter

var jsonSchema = {
             'type': 'array',
             'items': {
                 'type': 'object',
                 'properties': {
                     'simple': {
                         'type': 'string'
                     }
                 }
             }
         };
 
var data = [ { simple: 1 } ];
 
var result = cast(jsonSchema, data);
console.log(result)
//result: [{simple: "1"}]

Documentation

Examples

See examples

License

Copyright (c) 2013 agebrock Licensed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i starkjs-schema-filter

Weekly Downloads

2

Version

0.0.3

License

none

Last publish

Collaborators

  • chbrock