backbone.model.toggle

Add a toggle Method to Backbone.Model


License
MIT
Install
bower install backbone.model.toggle

Documentation

Backbone.Model.toggle Build Status

This is an extremely tiny plugin that patches Backbone.Model to include a toggle method.

Example

var book = new Backbone.Model({
  available: true
});

book.toggle('available') // Sets available to false