collection.size

size

collection.shuffle

shuffle

collection.shift

shiftcollection.shift([options]) Remove and return the first model from a collection. Takes the same options as remove.

collection.set

setcollection.set(models, [options]) The set method performs a "smart" update of the collection with the passed list of models. If a model in the list isn't yet in the collection it will be added; if the model is already in the collection its attributes will be merged; and if the collection contains any models that aren't present in the list, they'll be removed. All of the appropriate "add", "remove", and "change" events are fired as this happens. Returns the touched models in the collection.

collection.sample

sample

collection.rest

rest (tail, drop)

collection.reset

resetcollection.reset([models], [options]) Adding and removing models one at a time is all well and good, but sometimes you have so many models to change that you'd rather just update the collection in bulk. Use reset to replace a collection with a new list of models (or attribute hashes), triggering a single "reset" event on completion, and without triggering any add or remove events on any models. Returns the newly-set models. For convenience, within a "reset" event, the list of any previou

collection.remove

removecollection.remove(models, [options]) Remove a model (or an array of models) from the collection, and return them. Each model can be a Model instance, an id string or a JS object, any value acceptable as the id argument of collection.get. Fires a "remove" event for each model, and a single "update" event afterwards, unless {silent: true} is passed. The model's index before removal is available to listeners as options.index.

collection.reject

reject

collection.reduceRight

reduceRight (foldr)