README
Plaster
Simple Mongoose-inspired Schema based Javascript Object Modelling
Node.js >= 0.12 supported. For all features, run node with the harmony --harmony
and harmony proxies --harmony_proxies
flags.
Installation
npm install plaster
Overview
Plaster is a simple, Mongoose-inspired schema based Javascript object modelling library. Just define your schemas and create Javascript classes from them.
var plaster = require('plaster');
var schema = plaster.schema({ name: String });
var Cat = plaster.model('Cat', schema);
var kitty = new Cat({ name: 'Zildjian' });
console.log(kitty);
Features:
- Schema definition
- Strict modelling based on schema
- Schema extension
- Automatic type validation and custom validation
- Middleware including pre and post hooks
Documentation
Tests
Module automated tests can be run using npm test
command.
Credits
Lots of code and design inspired by Mongoose. Uses modified code from node-schema-object for modelling.
License
Copyright 2016 Bojan D.
Licensed under the MIT License.