0.0.3 • Published 10 years ago

starkjs-schema-filter v0.0.3

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

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.