https://github.com/hrsh7th/js-modelis
Modelis javascript modeling support.
https://github.com/hrsh7th/js-modelis
Last synced: 8 months ago
JSON representation
Modelis javascript modeling support.
- Host: GitHub
- URL: https://github.com/hrsh7th/js-modelis
- Owner: hrsh7th
- Created: 2014-05-02T14:31:41.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-24T17:49:09.000Z (over 11 years ago)
- Last Synced: 2025-02-03T14:49:35.390Z (8 months ago)
- Language: JavaScript
- Size: 297 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Modelis.
===========[](https://travis-ci.org/hrsh7th/js-modelis)
Modelis is very simple javascript modeling module for server-side and client-side.
Concept
===========- small core
- running on browser and server
- pluggablePlugin
===========
- [modelis-monk](http://github.com/hrsh7th/js-modelis-monk)
- [modelis-assurance](http://github.com/hrsh7th/js-modelis-assurance)Usage
===========## Basic
```js
var Modelis = require('modelis');// define.
var User = Modelis.define('User');
User.attr('name');
User.attr('age');// instantiate.
var user = new User({
name: 'john',
age: 19
});// get.
user.get('name'); //=> john
user.get('age'); //=> 19// set.
user.set('name', 'bob');// changed.
user.get('name'); //=> bob
```