plom
v0.0.2
Published
A model for promise based AJAX clients
Downloads
1
Readme
plom
A super simple model written with promises in mind.
Usage
var Plom = require('plom');
var Person = Plom.extend({
saveToServer: function() {
var data = this.get();
return $.post({
url: '/api/url',
data: data
})
}
});
var person = new Person();
person.set('name', 'Rhino');
person.set('location', 'San Francisco');
person
.saveToServer()
.then(console.log)
.done();