modelis

0.1.2 • Public • Published

Modelis.

Build Status

Modelis is very simple javascript modeling module for server-side and client-side.

Concept

  • small core
  • running on browser and server
  • pluggable

Plugin

Usage

Basic

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

Dependents (0)

Package Sidebar

Install

npm i modelis

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • hrsh7th