1.0.1 • Published 9 years ago

ubiquisync v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

npm version

Ubiquisync

Sync methods for backbone and ampersand that work in node and the browser.

Example

var sync = require('ubiquisync');
var AmpModel = require('ampersand-model');


var Person = AmpModel.extend({
    url: function(){
        var url = 'https://api.example.com/person';
        if(!this.isNew()){
            url = url + '/' + this.id;
        }
        return url;
    },
    props: {
        name: 'string'
    },
    sync: sync    
});

module.exports = Person;

..or something.

The model can then fetch, save etc both in node and on the browser.

1.0.1

9 years ago

1.0.0

9 years ago