Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Detect and apply changes on Backbone.js models
JavaScript
tag: v0.3.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.travis.yml
README.md
backbone-delta.js
backbone-delta.min.js
package.json
test.js

README.md

Backbone-delta Build Status

A couple of extra methods for Backbone.js, related to changing models and collections.

  • Backbone.Model#reset resets attributes of the model, also unsetting attributes that no longer exist, and triggers a single set event.

  • Backbone.Collection#delta resets a collection, and triggers several add, remove, and change events, but falls back to a normal reset when the contents has changed completely.

MIT licensed.

From the browser

Include backbone-delta.js or the minified version backbone-delta.min.js in your page. If Backbone.js is loaded, it will automatically be extended.

From Node.js

Install using NPM:

npm install backbone-delta

In your code:

var Backbone = require('backbone');
require('backbone-delta').extend(Backbone);

Hacking the code

git clone https://github.com/Two-Screen/backbone-delta.git
cd backbone-delta
npm install
npm test
Something went wrong with that request. Please try again.