Lines Matching refs:models

56     var models = [{a: 1}, {a: 2}, {a: 3}, {a: 4}];
57 var collection = new Collection(models, {parse: true});
560 collection.parse = function(models) {
562 return models;
765 assert.deepEqual(coll.reject({a: 4}), _.without(coll.models, model));
769 assert.deepEqual(coll.partition({a: 0})[1], coll.models);
771 assert.deepEqual(coll.partition({a: 4})[1], _.without(coll.models, model));
788 var models = col.models;
794 col.reset(models);
798 col.reset(_.map(models, function(m){ return m.attributes; }));
867 var models = [attrs];
868 new Backbone.Collection().add(models);
869 assert.equal(models.length, 1);
870 assert.ok(attrs === models[0]);
894 collection.remove(collection.models);
1313 parse: function(res) { return _.map(res.models, 'model'); }
1317 collection.set({models: [
1342 assert.deepEqual(collection.models, [three, two, one]);
1344 assert.deepEqual(collection.models, [one, two]);
1346 assert.deepEqual(collection.models, [two, three, one]);
1348 assert.deepEqual(collection.models, [two, three, one]);
1350 assert.deepEqual(collection.models, [one, two, three]);
1352 assert.deepEqual(collection.models, [one, two, three]);
1452 collection.add(collection.models); // don't sort, nothing new
1453 collection.add(collection.models, {merge: true}); // don't sort
1468 collection.add(collection.models); // don't sort, nothing new
1469 collection.add(collection.models, {merge: true}); // don't sort
1491 initialize: function(models, options) { argument
1492 assert.strictEqual(models, falsey);
1643 assert.equal(collection.models.length, 1);
1647 assert.equal(collection.models.length, 1);
1655 assert.strictEqual(collection.models.length, 0);