--- a/backbone.shard.js Wed Jun 22 13:19:44 2016 +0800
+++ b/backbone.shard.js Wed Jun 22 13:22:40 2016 +0800
* (c) 2013 Anton Shestakov.
* This extension to Backbone may be freely distributed
* http://opensource.org/licenses/mit-license.php
Backbone.Shard = function(options) {
this._collection = options.collection;
this._filter = options.filter;
this.models = this._collection.filter(this._filter);
.on('all', function(event, model) {
this.models = this._collection.filter(this._filter);
this.initialize.apply(this, arguments);
_.extend(Backbone.Shard.prototype, Backbone.Events, {
initialize: function() {},
return _.map(this.models, function(model) { return model.get(attr); });