Parser and compiler for JS models by JSON schema.
bower i json-schema-model --save
# or
npm i json-schema-model --save
function User (obj) {
JsonSchemaModel.call(this, {
firstName: 'first_name',
lastName: 'last_name',
middleName: 'middle_name'
});
this.fromSchema(obj);
}
fromSchema
- parse data by the schema object.
toSchema
- convert data to the schema object.
schema
- schema object
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
2.06.16 Initial config
Author: Alexey Bondarenko bondalex.com
MIT