0.0.2 • Published 12 years ago

registrar v0.0.2

Weekly downloads
15
License
-
Repository
github
Last release
12 years ago

registrar

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();
0.0.2

12 years ago

0.0.1

12 years ago