Global

Members

SORTING_ORDER

Possible results when comparing two items.
Source:

Methods

fromPairsMap(collection, iteratee)

Applies `fromPairs` to the result of mapping given `iteratee` to given collection.
Parameters:
Name Type Description
collection Collection to iterate over
iteratee Function invoked per iteration
Source:

fromPairsMapNonNil(collection, iteratee)

Applies `fromPairs` to the result of mapping and filtering `nil` values given `iteratee` to given collection.
Parameters:
Name Type Description
collection Collection to iterate over
iteratee Function invoked per iteration
Source:

getTruthyKeys(collection, parseKeyFunction)

Gets the keys associated with truthy values in given collection.
Parameters:
Name Type Description
collection Collection to iterate over.
parseKeyFunction Function invoked per iteration. This function takes as parameter a key of a truthy value. The value it returns will be used in resulting list.
Source:

hasTruthyValues(collection)

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.
Parameters:
Name Type Description
collection Collection to iterate over.
Source:

mGet(object, arrayOfKeys, defaultValue)

Returns multiple values of an object, defaulting missing ones to a common default.
Parameters:
Name Type Description
object Object to be queried.
arrayOfKeys Array with the paths of the properties to get.
defaultValue The value returned for missing resolved values.
Source:

mapNonNil(collection, iteratee)

Map function returning only non-nil elements.
Parameters:
Name Type Description
collection Collection to iterate over.
iteratee Function invoked per iteration.
Source:

mergeForEach(lhs, rhs, options, comparator)

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`.
Source:

mergeJoinWith(lhs, rhs, options, comparator)

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`.
Source:

shortcuttedReduce(collection, iteratee, accumulator)

Reduce which finish as soon as accumulator changes.
Parameters:
Name Type Description
collection Collection to be reduced.
iteratee Function that will be called in each iteration. It'll receive as parameters the accumulator, the value and the index.
accumulator Note that is **must** be a simple primitive.
Source:

sumMultipleFinite(object, arrayOfKeys)

Returns the `sum` of multiple values from an object, adding just the `finite` ones.
Parameters:
Name Type Description
object Object to be queried.
arrayOfKeys Array with the paths of the properties to get.
Source: