each
|
This iterates over every Model in the Collection
|
map
|
This returns an array of values by transforming every Model in the Collection
|
reduce
|
This returns a single value generated from all the Models in a Collection
|
reduceRight
|
The same as reduc
e , except that it iterates backwards
|
find
|
This returns the first Model that matches a testing function
|
filter
|
This returns all the Models that match a testing function
|
reject
|
This returns all the Models that don't match a testing function
|
every
|
This returns true if every Model in the Collection matches a test function
|
some
|
This returns true if some (any) Model in the Collection matches a test function
|
contains
|
This returns true if the Collection includes the provided Model
|
invoke
|
This calls a specified function on every Model in the Collection and returns the result
|
max
|
This applies a conversion function to every Model in the Collection and returns the maximum value returned
|
min
|
This applies a conversion function to every Model in the Collection and returns the minimum value returned
|
sortBy
|
This returns the Collection's Models sorted based on an indicated attribute
|
groupBy
|
This returns the Collection's Models grouped by an indicated attribute
|
shuffle
|
This returns one or more randomly chosen Models from the Collection
|
toArray
|
This returns an array of the Collection's Models
|
size
|
This returns a count of Models in the Collection, such as Collection.length
|
first
|
This returns the first (or first N) Model(s) in the Collection
|
initial
|
This returns all but the last Model in the Collection
|
rest
|
This returns all the Models in the Collection after the first N
|
last
|
This returns the last (or last N) Model(s) in the Collection
|
without
|
This returns all the Models in the Collection except the provided ones
|
indexOf
|
This returns the index of the first provided Model in the Collection
|
lastIndexOf
|
This returns the index of the last provided Model in the Collection
|
isEmpty
|
This returns true if the Collection contains no Models
|
chain
|
This returns a version of Collection that can have multiple Underscore methods called on it successively (chained); call the value method at the end of the chain to get the result of the calls
|
pluck
|
This returns the provided attribute from each Model in the Collection
|
where
|
This returns all the Models in the Collection that match the provided attribute template
|
findWhere
|
This returns the first Model found in the Collection that matches the provided attribute template
|