All exernal dependencies required in this scope.
All components that need to be referenced in this scope.
List of attributes attached directly from the constructor's options object.
A list of properties that are omitted from the Backbone.Model.prototype
, to create
a generic collection base.
Copied over from Backbone.
The tableName
on the associated Model, used in relation building.
The idAttribute
on the associated Model, used in relation building.
A simplified version of Backbone's Collection#set
method,
removing the comparator, and getting rid of the temporary model creation,
since there's no way we'll be getting the data in an inconsistent
form from the database.
Turn bare objects into model references, and prevent invalid models from being added.
If a duplicate is found, prevent it from being added and optionally merge it into the existing model.
This is a new model, push it to the toAdd
list.
Listen to added models' events, and index models for lookup by
id
and by cid
.
Remove nonexistent models if appropriate.
See if sorting is needed, update length
and splice in new models.
Trigger add
events.
Prepare a model or hash of attributes to be added to this collection.
Run "Promise.map" over the models
Convenience method for invoke, returning a Promise.all
promise.
Run "reduce" over the models in the collection.
List of attributes attached directly from the options
passed to the constructor.
Helper to mixin one or more additional items to the current prototype.
Base Collection