lodash v0.0.3 Lodash.Collection
Specialized functions to manipulate enumerable.
Summary
Functions
Create an enumerable with all falsey values removed
Create an enumerable from collection1 whose values are not included collection2
The method is like difference
except that it accepts interatee to compare
Create an enumerable of unique values that are included in all given from collection1, collection2
The method is like intersection
except that it accepts interatee to compare
Remove all given values from collection which has the same value as key
The method is like pull
except it from collection
Create an enumerable of unique values from all given values
The method is like union
except it accepts interatee
Functions
Create an enumerable with all falsey values removed.
Examples
iex> Lodash.Collection.compact([1, 2, nil])
[1, 2]
Create an enumerable from collection1 whose values are not included collection2.
Examples
iex> Lodash.Collection.difference([1, 2], [2, 3])
[1]
The method is like difference
except that it accepts interatee to compare.
Examples
iex> Lodash.Collection.difference_by([1.1, 2.2], [1.2, 3.0], fn(x, y) -> Float.floor(x) == Float.floor(y) end)
[2.2]
Create an enumerable of unique values that are included in all given from collection1, collection2.
Examples
iex> Lodash.Collection.intersection([1, 2], [2, 3])
[2]
The method is like intersection
except that it accepts interatee to compare
Examples
iex> Lodash.Collection.intersection_by([1.1, 2.2], [1.2, 3.0], fn(x, y) -> Float.floor(x) == Float.floor(y) end)
[1.1]
Remove all given values from collection which has the same value as key
Examples
iex> Lodash.Collection.pull([1, 2], 1)
[2]
The method is like pull
except it from collection.
Examples
iex> Lodash.Collection.pull_all([1, 2, 3], [3, 4])
[1, 2]