Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bojand/plaster
Simple Mongoose-inspired schema based Javascript object modelling
https://github.com/bojand/plaster
Last synced: about 2 months ago
JSON representation
Simple Mongoose-inspired schema based Javascript object modelling
- Host: GitHub
- URL: https://github.com/bojand/plaster
- Owner: bojand
- License: mit
- Created: 2016-02-11T01:08:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-02-18T19:49:50.000Z (over 8 years ago)
- Last Synced: 2024-07-19T06:34:26.053Z (2 months ago)
- Language: JavaScript
- Homepage: http://bojand.github.io/plaster
- Size: 309 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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.```js
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
[Full documentation](https://bojand.github.com/plaster)
## Tests
Module automated tests can be run using `npm test` command.
## Credits
Lots of code and design inspired by [Mongoose](http://mongoosejs.com/).
Uses modified code from [node-schema-object](https://github.com/scotthovestadt/node-schema-object) for modelling.## License
Copyright 2016 Bojan D.
Licensed under the MIT License.