Returns whether given collection has at least one truthy value for one of its
keys.
This function stops traversing the collection as soon as it finds a truthy
value.
Divide-and-conquer-based for-each function where a different iteratee is
called for items in both collections, items in the left one but not in the
right one and items in the right one but not in the left one.
Can be used to implement efficient algorithms which profit from sorted data
like `mergeSort` or `mergeJoinWith`.
Both collections must be sortable. They will be sorted ascendantly using
value returned by the corresponding iteratee.
Parameters:
Name
Type
Description
lhs
A collection of elements.
rhs
A collection of elements.
options
Options for comparison.
Properties
Name
Type
Description
lhsIteratee
Iteratee used to get the value used to sort `lhs`.
Returned value will be used to sort the collection before running the
divide-and-conquer algorithm.
rhsIteratee
Iteratee used to get the value used to sort `rhs`.
Returned value will be used to sort the collection
before running the divide-and-conquer algorithm.
innerCallback
Callback called when there are two matching
elements. Boths elements are passed as arguments.
leftCallback
Callback called when there are elements in the
left-hand-side collection which cannot be matched with any element of the
right-hand-side collection.
rightCallback
Callback called when there are elements in the
right-hand-side collection which cannot be matched with any element of the
left-hand-side collection.
comparator
Function used to compare an item of `lhs` collection against
an item of `rhs` collection. Negative values mean that `lhs` item is **before**
`rhs` item, positive values that `lhs` item is **after** `rhs` item and `0`
that both items are equivalent in terms of sorting. Default implementation is
equivalent to `<` operator. Will receive as 3rd and 4th parameters the
iteratees used to get sorting value for `lhs` and `rhs`.
Divide-and-conquer-based join function to merge two arrays into a new one.
Both collections must be sortable. They will be sorted ascendently using
value returned by the corresponding iteratee.
Parameters:
Name
Type
Description
lhs
A collection of elements.
rhs
A collection of elements.
options
Options for comparison.
Properties
Name
Type
Description
lhsIteratee
Iteratee used to get the value used to sort `lhs`.
Returned value will be used to sort the collection before running the
divide-and-conquer algorithm.
rhsIteratee
Iteratee used to get the value used to sort `rhs`.
Returned value will be used to sort the collection
before running the divide-and-conquer algorithm.
getInnerJoinedItem
Callback called when there are two matching
elements. Boths elements are passed as arguments. Must return the resulting
element of merging both parameters.
getLeftJoinedItem
Callback called when there are elements in
the left-hand-side collection which cannot be matched with any element of the
right-hand-side collection. Must return the element to be added to results array.
getRightJoinedItem
Callback called when there are elements in
the right-hand-side collection which cannot be matched with any element of the
left-hand-side collection. Must return the element to be added to results array.
comparator
Function used to compare an item of `lhs` collection against
an item of `rhs` collection. Negative values mean that `lhs` item is **before**
`rhs` item, positive values that `lhs` item is **after** `rhs` item and `0`
that both items are equivalent in terms of sorting. Default implementation is
equivalent to `<` operator. Will receive as 3rd and 4th parameters the
iteratees used to get sorting value for `lhs` and `rhs`.