registrar

0.0.2 • Public • Published

registrar

Build Status

Extensible, storage-agnostic object models, backbone-style.

Example

var Model = require('registrar').Model;

// define a new model
var Person = Model.extend({
  // add your instance methods
  logExample: function() {
    console.log(this.name, 'is', this.age, 'years old.')
  }
});

// create a new instance of that model
var person = new Person({ name: 'Ben', 'age': 29 });

// run the instance method
person.logExample();

// set a value on that instance
person.set('age', 30);

// run the instance method again
person.logExample();

Readme

Keywords

none

Package Sidebar

Install

npm i registrar

Weekly Downloads

3

Version

0.0.2

License

none

Last publish

Collaborators

  • bensheldon