Introducing npm Teams! Private packages + team management tools.Learn more »

@gitterhq/backbone-proxy-collection

2.3.0 • Public • Published

Backbone.Collection Proxy

A simple utility to help switching out collections whilst allowing their respective views to function normally.

Examples:

 
//Make a new collection
var privateCollection = new Backbone.Collection();
var publicCollection  = new ProxyCollection({
  collection: privateCollection
});
 

Now at any point if you want to switch the collection call:

 
var newCollection = new Backbone.Collection();
publicCollection.switchCollection(newCollection);
 

This will maintain you event bindings etc. Simples.

Keywords

none

Install

npm i @gitterhq/backbone-proxy-collection

DownloadsWeekly Downloads

63

Version

2.3.0

License

MIT

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar