Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

bensheldon/registrar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Extensible, storage-agnostic object models, backbone-style

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published