Type Parameters

  • T

  • V = T[]

Hierarchy

  • Underscore

Properties

all: ((iteratee?: Iteratee<V, boolean, TypeOfCollection<V, never>>, context?: any) => boolean)

Type declaration

any: ((iteratee?: Iteratee<V, boolean, TypeOfCollection<V, never>>, context?: any) => boolean)

Type declaration

collect: (<I>(iteratee: I, context?: any) => IterateeResult<I, T>[])

Type declaration

detect: ((iteratee?: Iteratee<V, boolean, TypeOfCollection<V, never>>, context?: any) => undefined | T)

Type declaration

drop: ((n?: number) => T[])

Type declaration

    • (n?: number): T[]
    • See

      rest

      Parameters

      • Optional n: number

      Returns T[]

foldl: {
    <TResult>(iteratee: MemoCollectionIterator<TypeOfCollection<V, never>, TResult, V>, memo: TResult, context?: any): TResult;
    <TResult>(iteratee: MemoCollectionIterator<TypeOfCollection<V, never>, TypeOfCollection<V, never> | TResult, V>): undefined | TypeOfCollection<V, never> | TResult;
}

Type declaration

foldr: {
    <TResult>(iteratee: MemoCollectionIterator<TypeOfCollection<V, never>, TResult, V>, memo: TResult, context?: any): TResult;
    <TResult>(iteratee: MemoCollectionIterator<TypeOfCollection<V, never>, TypeOfCollection<V, never> | TResult, V>): undefined | TypeOfCollection<V, never> | TResult;
}

Type declaration

forEach: ((iteratee: CollectionIterator<TypeOfCollection<V, never>, void, V>, context?: any) => V)

Type declaration

head: {
    (): undefined | T;
    (n: number): T[];
}

Type declaration

    • (): undefined | T
    • See

      first

      Returns undefined | T

    • (n: number): T[]
    • See

      first

      Parameters

      • n: number

      Returns T[]

include: ((value: any, fromIndex?: number) => boolean)

Type declaration

    • (value: any, fromIndex?: number): boolean
    • See

      contains

      Parameters

      • value: any
      • Optional fromIndex: number

      Returns boolean

includes: ((value: any, fromIndex?: number) => boolean)

Type declaration

    • (value: any, fromIndex?: number): boolean
    • See

      contains

      Parameters

      • value: any
      • Optional fromIndex: number

      Returns boolean

inject: {
    <TResult>(iteratee: MemoCollectionIterator<TypeOfCollection<V, never>, TResult, V>, memo: TResult, context?: any): TResult;
    <TResult>(iteratee: MemoCollectionIterator<TypeOfCollection<V, never>, TypeOfCollection<V, never> | TResult, V>): undefined | TypeOfCollection<V, never> | TResult;
}

Type declaration

select: ((iteratee?: Iteratee<V, boolean, TypeOfCollection<V, never>>, context?: any) => T[])

Type declaration

tail: ((n?: number) => T[])

Type declaration

    • (n?: number): T[]
    • See

      rest

      Parameters

      • Optional n: number

      Returns T[]

take: {
    (): undefined | T;
    (n: number): T[];
}

Type declaration

    • (): undefined | T
    • See

      first

      Returns undefined | T

    • (n: number): T[]
    • See

      first

      Parameters

      • n: number

      Returns T[]

unique: {
    (isSorted?: boolean, iteratee?: Iteratee<V, any, TypeOfCollection<V, never>>, cotext?: any): T[];
    (iteratee?: Iteratee<V, any, TypeOfCollection<V, never>>, context?: any): T[];
}

Type declaration

Methods

  • Wrapped type number.

    See

    _.after

    Parameters

    • fn: Function

    Returns Function

  • Wrapped type object.

    See

    _.allKeys

    Returns string[]

  • Wrapped type number.

    See

    _.before

    Parameters

    • fn: Function

    Returns Function

  • Wrapped type Function.

    See

    _.bind

    Parameters

    • object: any
    • Rest ...args: any[]

    Returns Function

  • Wrapped type object.

    See

    _.bindAll

    Parameters

    • Rest ...methodNames: string[]

    Returns any

  • Returns a wrapped object. Calling methods on this object will continue to return wrapped objects until value() is used.

    Returns

    An underscore chain wrapper around the wrapped value.

    Returns _Chain<T, V>

  • Chunks the wrapped list into multiple arrays, each containing length or fewer items.

    Returns

    The contents of the wrapped list in chunks no greater than length in size.

    Parameters

    • length: number

      The maximum size of the chunks.

    Returns T[][]

  • Wrapped type any[].

    See

    _.clone

    Returns T

  • Returns a copy of the wrapped list with all falsy values removed. In JavaScript, false, null, 0, "", undefined and NaN are all falsy.

    Returns

    An array containing the elements of the wrapped list without falsy values.

    Returns Exclude<T, AnyFalsy>[]

  • Wrapped type Function[].

    See

    _.compose

    Parameters

    • Rest ...functions: Function[]

    Returns Function

  • Wrapped type any.

    See

    _.constant

    Returns (() => T)

      • (): T
      • Wrapped type any.

        See

        _.constant

        Returns T

  • Returns true if the value is present in the wrapped collection. Uses indexOf internally, if the wrapped collection is a List. Use fromIndex to start your search at a given index.

    Returns

    True if value is present in the wrapped collection after fromIndex, otherwise false.

    Parameters

    • value: any

      The value to check the wrapped collection for.

    • Optional fromIndex: number

      The index to start searching from, optional, default = 0, only used when the wrapped collection is a List.

    Returns boolean

  • Sorts the wrapped collection into groups and returns a count for the number of objects in each group. Similar to groupBy, but instead of returning a list of values, returns a count for the number of values in that group.

    Returns

    A dictionary with the group names provided by iteratee as properties where each property contains the count of the grouped elements from the wrapped collection.

    Parameters

    • Optional iteratee: Iteratee<V, string | number, TypeOfCollection<V, never>>

      An iteratee that provides the value to count by for each item in the wrapped collection.

    • Optional context: any

      this object in iteratee, optional.

    Returns Dictionary<number>

  • Wrapped type any.

    See

    _.create

    Parameters

    • Optional props: object

    Returns any

  • Wrapped type Function.

    See

    _.debounce

    Parameters

    • wait: number
    • Optional immediate: boolean

    Returns Function & Cancelable

  • Wrapped type object.

    See

    _.defaults

    Parameters

    • Rest ...defaults: any[]

    Returns any

  • Wrapped type Function.

    See

    _.defer

    Parameters

    • Rest ...args: any[]

    Returns void

  • Wrapped type Function.

    See

    _.delay

    Parameters

    • wait: number
    • Rest ...args: any[]

    Returns any

  • See

    _.delay

    Parameters

    • Rest ...args: any[]

    Returns any

  • Similar to without, but returns the values from the wrapped list that are not present in others.

    Returns

    The contents of the wrapped list without the values in others.

    Parameters

    • Rest ...others: List<T>[]

      The lists of values to exclude from the wrapped list.

    Returns T[]

  • Iterates over the wrapped collection of elements, yielding each in turn to an iteratee. The iteratee is bound to the context object, if one is passed.

    Returns

    The originally wrapped collection.

    Parameters

    • iteratee: CollectionIterator<TypeOfCollection<V, never>, void, V>

      The iteratee to call for each element in the wrapped collection.

    • Optional context: any

      'this' object in iteratee, optional.

    Returns V

  • Wrapped type string.

    See

    _.escape

    Returns string

  • Returns true if all of the values in the wrapped collection pass the iteratee truth test. Short-circuits and stops traversing the wrapped collection if a false element is found.

    Returns

    True if all elements pass the truth test, otherwise false.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns boolean

  • Wrapped type object.

    See

    _.extend

    Parameters

    • Rest ...sources: any[]

    Returns any

  • Looks through each value in the wrapped collection, returning an array of all the values that pass a truth test (iteratee).

    Returns

    The set of values that pass the truth test.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns T[]

  • Looks through each value in the wrapped collection, returning the first one that passes a truth test (iteratee), or undefined if no value passes the test. The function returns as soon as it finds an acceptable element, and doesn't traverse the entire collection.

    Returns

    The first element in the wrapped collection that passes the truth test or undefined if no elements pass.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns undefined | T

  • Returns the first index of an element in the wrapped list where the iteratee truth test passes, otherwise returns -1.

    Returns

    The index of the first element in the wrapped list where the truth test passes or -1 if no elements pass.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns number

  • Similar to findIndex but for keys in objects. Returns the key where the iteratee truth test passes or undefined.

    Returns

    The first element in the wrapped object that passes the truth test or undefined if no elements pass.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, any>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns undefined | Extract<keyof V, string>

  • Returns the last index of an element in the wrapped list where the iteratee truth test passes, otherwise returns -1.

    Returns

    The index of the last element in the wrapped list where the truth test passes or -1 if no elements pass.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns number

  • Looks through the wrapped collection and returns the first value that matches all of the key-value pairs listed in properties. If no match is found, or if list is empty, undefined will be returned.

    Returns

    The first element in the wrapped collection that matches properties or undefined if no match is found.

    Parameters

    • properties: Partial<T>

      The properties to check for on the elements within the wrapped collection.

    Returns undefined | T

  • Returns the first element of the wrapped list. Passing n will return the first n elements of the wrapped list.

    Returns

    The first n elements of the wrapped list or the first element if n is omitted.

    Returns undefined | T

  • Parameters

    • n: number

    Returns T[]

  • Flattens a nested list (the nesting can be to any depth). If you pass depth, the wrapped list will only be flattened a single level.

    Returns

    The flattened list.

    Parameters

    • depth: true | 1

      True to only flatten one level, optional, default = false.

    Returns ListItemOrSelf<T>[]

  • Parameters

    • Optional depth: number | false

    Returns DeepestListItemOrSelf<T>[]

  • Wrapped type object.

    See

    _.functions

    Returns string[]

  • Wrapped type any.

    See

    _.get

    Parameters

    • path: string | string[]

    Returns undefined | TypeOfCollection<V, never>

  • Type Parameters

    • U

    Parameters

    • path: string | string[]
    • Optional defaultValue: U

    Returns TypeOfCollection<V, never> | U

  • Splits the warpped collection into sets that are grouped by the result of running each value through iteratee.

    Returns

    A dictionary with the group names provided by iteratee as properties where each property contains the grouped elements from the wrapped collection.

    Parameters

    • Optional iteratee: Iteratee<V, string | number, TypeOfCollection<V, never>>

      An iteratee that provides the value to group by for each item in the wrapped collection.

    • Optional context: any

      this object in iteratee, optional.

    Returns Dictionary<T[]>

  • Wrapped type object.

    See

    _.has

    Parameters

    • key: string

    Returns boolean

  • Wrapped type any.

    See

    _.identity

    Returns any

  • Given the warpped collection and an iteratee function that returns a key for each element in the wrapped collection, returns an object that acts as an index of each item. Just like groupBy, but for when you know your keys are unique.

    Returns

    A dictionary where each item in the wrapped collection is assigned to the property designated by iteratee.

    Parameters

    • Optional iteratee: Iteratee<V, string | number, TypeOfCollection<V, never>>

      An iteratee that provides the value to index by for each item in the wrapped collection.

    • Optional context: any

      this object in iteratee, optional.

    Returns Dictionary<T>

  • Returns the index at which value can be found in the wrapped list, or -1 if value is not present. If you're working with a large list and you know that the list is already sorted, pass true for isSortedOrFromIndex to use a faster binary search...or, pass a number in order to look for the first matching value in the list after the given index.

    Returns

    The index of the first occurrence of value within the wrapped list or -1 if value is not found.

    Parameters

    • value: T

      The value to search for within the wrapped list.

    • Optional isSortedOrFromIndex: number | boolean

      True if the wrapped list is already sorted OR the starting index for the search, optional.

    Returns number

  • Returns everything but the last entry of the wrapped list. Especially useful on the arguments object. Pass n to exclude the last n elements from the result.

    Returns

    The elements of the wrapped list with the last n items omitted.

    Parameters

    • Optional n: number

      The number of elements from the end of the wrapped list to omit, optional, default = 1.

    Returns T[]

  • Computes the list of values that are the intersection of the wrapped list and the passed-in lists. Each value in the result is present in each of the lists.

    Returns

    The intersection of elements within the the wrapped list and lists.

    Parameters

    • Rest ...lists: List<T>[]

      The lists (along with the wrapped list) to compute the intersection of.

    Returns T[]

  • Wrapped type object.

    See

    _.invert

    Returns any

  • Calls the method named by methodName on each value in the wrapped collection. Any extra arguments passed to invoke will be forwarded on to the method invocation.

    Returns

    An array containing the result of the method call for each item in the wrapped collection.

    Parameters

    • methodName: string

      The name of the method to call on each element in the wrapped collection.

    • Rest ...args: any[]

      Additional arguments to pass to method methodName.

    Returns any[]

  • Returns true if the wrapped object is an Arguments object.

    Returns

    True if the wrapped object is an Arguments object, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is an Array.

    Returns

    True if the wrapped object is an Array, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is an ArrayBuffer.

    Returns

    True if the wrapped object is an ArrayBuffer, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a Boolean.

    Returns

    True if the wrapped object is a Boolean, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a DataView.

    Returns

    True if the wrapped object is a DataView, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a Date.

    Returns

    True if the wrapped object is a Date, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a DOM element.

    Returns

    True if the wrapped object is a DOM element, otherwise false.

    Returns boolean

  • Returns true if the wrapped collection contains no values. For strings and array-like objects checks if the length property is 0.

    Returns

    True if the wrapped collection has no elements.

    Returns boolean

  • Performs an optimized deep comparison between the wrapped object and other to determine if they should be considered equal.

    Returns

    True if the wrapped object should be considered equal to other.

    Parameters

    • other: any

      Compare to the wrapped object.

    Returns boolean

  • Returns true if the wrapped object is a Error.

    Returns

    True if the wrapped object is a Error, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a finite Number.

    Returns

    True if the wrapped object is a finite Number.

    Returns boolean

  • Returns true if the wrapped object is a Function.

    Returns

    True if the wrapped object is a Function, otherwise false.

    Returns boolean

  • Returns true if the keys and values in properties are contained in the wrapped object.

    Returns

    True if all keys and values in properties are also in the wrapped object.

    Parameters

    • properties: any

      The properties to check for in the wrapped object.

    Returns boolean

  • Returns true if the wrapped object is NaN. Note: this is not the same as the native isNaN function, which will also return true if the variable is undefined.

    Returns

    True if the wrapped object is NaN, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is null.

    Returns

    True if the wrapped object is null, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a Number (including NaN).

    Returns

    True if the wrapped object is a Number, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is an Object. Note that JavaScript arrays and functions are objects, while (normal) strings and numbers are not.

    Returns

    True if the wrapped object is an Object, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a RegExp.

    Returns

    True if the wrapped object is a RegExp, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a String.

    Returns

    True if the wrapped object is a String, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a Symbol.

    Returns

    True if the wrapped object is a Symbol, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is a TypedArray.

    Returns

    True if the wrapped object is a TypedArray, otherwise false.

    Returns boolean

  • Returns true if the wrapped object is undefined.

    Returns

    True if the wrapped object is undefined, otherwise false.

    Returns boolean

  • Wrapped type string|Function|Object.

    See

    _.iteratee

    Parameters

    • Optional context: any

    Returns Function

  • Wrapped type object.

    See

    _.keys

    Returns string[]

  • Returns the last element of the wrapped list. Passing n will return the last n elements of the wrapped list.

    Returns

    The last n elements of the wrapped list or the last element if n is omitted.

    Returns undefined | T

  • Parameters

    • n: number

    Returns T[]

  • Returns the index of the last occurrence of value in the wrapped list, or -1 if value is not present. Pass fromIndex to start your search at a given index.

    Returns

    The index of the last occurrence of value within the wrapped list or -1 if value is not found.

    Parameters

    • value: T

      The value to search for within the wrapped list.

    • Optional fromIndex: number

      The starting index for the search, optional.

    Returns number

  • Produces a new array of values by mapping each value in the wrapped collection through a transformation iteratee.

    Returns

    The mapped result.

    Type Parameters

    Parameters

    • iteratee: I

      The iteratee to use to transform each item in the wrapped collection.

    • Optional context: any

      this object in iteratee, optional.

    Returns IterateeResult<I, T>[]

  • Like map, but for objects. Transform the value of each property in turn.

    Returns

    A new object with all of the wrapped object's property values transformed through iteratee.

    Type Parameters

    Parameters

    • iteratee: I

      The iteratee to use to transform property values.

    • Optional context: any

      this object in iteratee, optional.

    Returns { [ K in string | number | symbol]: IterateeResult<I, V[K]> }

  • Wrapped type any[].

    See

    _.matcher

    Returns ListIterator<T, boolean, List<T>>

  • Wrapped type any[].

    See

    _.matches

    Returns ListIterator<T, boolean, List<T>>

  • Returns the maximum value in the wrapped collection. If an iteratee is provided, it will be used on each element to generate the criterion by which the element is ranked. -Infinity is returned if list is empty. Non-numerical values returned by iteratee will be ignored.

    Returns

    The maximum element within the wrapped collection or -Infinity if the wrapped collection is empty.

    Parameters

    • Optional iteratee: Iteratee<V, any, TypeOfCollection<V, never>>

      The iteratee that provides the criterion by which each element is ranked, optional if evaluating a collection of numbers.

    • Optional context: any

      this object in iteratee, optional.

    Returns number | T

  • Wrapped type Function.

    See

    _.memoize

    Parameters

    • Optional hashFn: ((n: any) => string)
        • (n: any): string
        • Parameters

          • n: any

          Returns string

    Returns Function

  • See

    _.functions

    Returns string[]

  • Returns the minimum value in the wrapped collection. If an iteratee is provided, it will be used on each element to generate the criterion by which the element is ranked. Infinity is returned if list is empty. Non-numerical values returned by iteratee will be ignored.

    Returns

    The minimum element within the wrapped collection or Infinity if the wrapped collection is empty.

    Parameters

    • Optional iteratee: Iteratee<V, any, TypeOfCollection<V, never>>

      The iteratee that provides the criterion by which each element is ranked, optional if evaluating a collection of numbers.

    • Optional context: any

      this object in iteratee, optional.

    Returns number | T

  • Wrapped type object.

    See

    _.mixin

    Returns void

  • Wrapped type Function.

    See

    _.negate

    Returns ((...args: any[]) => boolean)

      • (...args: any[]): boolean
      • Wrapped type Function.

        See

        _.negate

        Parameters

        • Rest ...args: any[]

        Returns boolean

  • Wrapped type any.

    See

    _.noop

    Returns void

  • Converts lists into objects. Call on either a wrapped list of [key, value] pairs, or a wrapped list of keys and a list of values. Passing by pairs is the reverse of pairs. If duplicate keys exist, the last value wins.

    Returns

    An object comprised of the provided keys and values.

    Type Parameters

    • TValue

    Parameters

    • values: List<TValue>

      If the wrapped list is a list of keys, a list of values corresponding to those keys.

    Returns Dictionary<undefined | TValue>

  • Returns Dictionary<PairValue<T>>

  • Return a copy of the wrapped object that is filtered to omit the disallowed keys (or array of keys).

    Returns

    A copy of the wrapped object without the keys properties.

    Type Parameters

    • K extends string

    Parameters

    • Rest ...keys: (K | K[])[]

      The keys to omit from the wrapped object.

    Returns _Omit<V, K>

  • Return a copy of the wrapped object that is filtered to not have values for the keys selected by a truth test.

    Returns

    A copy of the wrapped object without the keys selected by iterator.

    Parameters

    Returns Partial<V>

  • Wrapped type Function.

    See

    _.once

    Returns Function

  • Convert the wrapped object into a list of [key, value] pairs. The opposite of the single-argument signature of _.object.

    Returns

    The list of [key, value] pairs from the wrapped object.

    Returns [Extract<keyof V, string>, TypeOfCollection<V, any>][]

  • Wrapped type Function.

    See

    _.partial

    Parameters

    • Rest ...args: any[]

    Returns Function

  • Splits the wrapped collection into two arrays: one whose elements all satisfy iteratee and one whose elements all do not satisfy iteratee.

    Returns

    An array composed of two elements, where the first element contains the elements in the wrapped collection that satisfied the predicate and the second element contains the elements that did not.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The iteratee that defines the partitioning scheme for each element in the wrapped collection.

    • Optional context: any

      this object in iteratee, optional.

    Returns [T[], T[]]

  • Return a copy of the wrapped object that is filtered to only have values for the allowed keys (or array of keys).

    Returns

    A copy of the wrapped object with only the keys properties.

    Type Parameters

    • K extends string

    Parameters

    • Rest ...keys: (K | K[])[]

      The keys to keep on the wrapped object.

    Returns _Pick<V, K>

  • Return a copy of the wrapped object that is filtered to only have values for the keys selected by a truth test.

    Returns

    A copy of the wrapped object with only the keys selected by iterator.

    Parameters

    Returns Partial<V>

  • A convenient version of what is perhaps the most common use-case for map: extracting a list of property values.

    Returns

    The set of values for the specified propertyName for each item in the wrapped collection.

    Type Parameters

    • K extends string | number

    Parameters

    • propertyName: K

      The name of a specific property to retrieve from all items in the wrapped collection.

    Returns PropertyTypeOrAny<T, K>[]

  • Wrapped type string.

    See

    _.property

    Returns ((object: any) => any)

      • (object: any): any
      • Wrapped type string.

        See

        _.property

        Parameters

        • object: any

        Returns any

  • Wrapped type object.

    See

    _.propertyOf

    Returns ((key: string) => any)

      • (key: string): any
      • Wrapped type object.

        See

        _.propertyOf

        Parameters

        • key: string

        Returns any

  • Wrapped type number.

    See

    _.random

    Returns number

  • Wrapped type number.

    See

    _.random

    Parameters

    • max: number

    Returns number

  • A function to create flexibly-numbered lists of integers, handy for each and map loops. Returns a list of integers from the wrapped value (inclusive) to stop (exclusive), incremented (or decremented) by step. Note that ranges that stop before they start are considered to be zero-length instead of negative - if you'd like a negative range, use a negative step.

    If stop is not specified, the wrapped value will be the number to stop at and the default start of 0 will be used.

    Returns

    An array of numbers from start to stop with increments of step.

    Parameters

    • Optional stop: number

      The number to stop at.

    • Optional step: number

      The number to count up by each iteration, optional, default = 1.

    Returns number[]

  • Also known as inject and foldl, reduce boils down the wrapped collection of values into a single value. memo is the initial state of the reduction, and each successive step of it should be returned by iteratee.

    If no memo is passed to the initial invocation of reduce, iteratee is not invoked on the first element of the wrapped collection. The first element is instead passed as the memo in the invocation of iteratee on the next element in the wrapped collection.

    Returns

    The reduced result.

    Type Parameters

    • TResult

    Parameters

    • iteratee: MemoCollectionIterator<TypeOfCollection<V, never>, TResult, V>

      The function to call on each iteration to reduce the collection.

    • memo: TResult

      The initial reduce state or undefined to use the first item in collection as initial state.

    • Optional context: any

      this object in iteratee, optional.

    Returns TResult

  • Type Parameters

    Parameters

    Returns undefined | TypeOfCollection<V, never> | TResult

  • Returns the values in the wrapped collection without the elements that pass a truth test (iteratee). The opposite of filter.

    Returns

    The set of values that fail the truth test.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns T[]

  • Returns the rest of the elements in the wrapped list. Pass an index to return the values of the list from that index onward.

    Returns

    The elements of the wrapped list from index to the end of the list.

    Parameters

    • Optional n: number

    Returns T[]

  • Wrapped type Function.

    See

    _.once

    Parameters

    • Optional starIndex: number

    Returns Function

  • Wrapped type object.

    See

    _.result

    Parameters

    • property: string
    • Optional defaultValue: any

    Returns any

  • Produce a random sample from the wrapped collection. Pass a number to return n random elements from the wrapped collection. Otherwise a single random item will be returned.

    Returns

    A random sample of n elements from the wrapped collection or a single element if n is not specified.

    Parameters

    • n: number

      The number of elements to sample from the wrapped collection.

    Returns T[]

  • Returns undefined | T

  • Returns a shuffled copy of the wrapped collection, using a version of the Fisher-Yates shuffle.

    Returns

    A shuffled copy of the wrapped collection.

    Returns T[]

  • Determines the number of values in the wrapped collection.

    Returns

    The number of values in the wrapped collection.

    Returns number

  • Returns true if any of the values in the wrapped collection pass the iteratee truth test. Short-circuits and stops traversing the wrapped collection if a true element is found.

    Returns

    True if any element passed the truth test, otherwise false.

    Parameters

    • Optional iteratee: Iteratee<V, boolean, TypeOfCollection<V, never>>

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns boolean

  • Returns a (stably) sorted copy of the wrapped collection, ranked in ascending order by the results of running each value through iteratee.

    Returns

    A sorted copy of the wrapped collection.

    Parameters

    • Optional iteratee: Iteratee<V, any, TypeOfCollection<V, never>>

      An iteratee that provides the value to sort by for each item in the wrapped collection.

    • Optional context: any

      this object in iteratee, optional.

    Returns T[]

  • Uses a binary search to determine the lowest index at which the value should be inserted into the wrapped list in order to maintain the wrapped list's sorted order. If an iteratee is provided, it will be used to compute the sort ranking of each value, including the value you pass.

    Returns

    The index where value should be inserted into the wrapped list.

    Parameters

    • value: T

      The value to determine an insert index for to mainain the sorting in the wrapped list.

    • Optional iteratee: Iteratee<undefined | V, any, TypeOfCollection<V, never>>

      Iteratee to compute the sort ranking of each element including value, optional.

    • Optional context: any

      this object in iteratee, optional.

    Returns number

  • Wrapped type object.

    See

    _.tap

    Parameters

    • interceptor: ((...as: any[]) => any)
        • (...as: any[]): any
        • Parameters

          • Rest ...as: any[]

          Returns any

    Returns any

  • Wrapped type number.

    See

    _.times

    Type Parameters

    • TResult

    Parameters

    • iterator: ((n: number) => TResult)
        • (n: number): TResult
        • Parameters

          • n: number

          Returns TResult

    • Optional context: any

    Returns TResult[]

  • Creates a real Array from the wrapped collection (anything that can be iterated over). Useful for transmuting the arguments object.

    Returns

    An array containing the elements of the wrapped collection.

    Returns T[]

  • Returns any[][]

  • Wrapped type string.

    See

    _.unescape

    Returns string

  • Computes the union of the wrapped list and the passed-in lists: the list of unique items, examined in order from first list to last list, that are present in one or more of the lists.

    Returns

    The union of elements within the wrapped list and lists.

    Parameters

    • Rest ...lists: List<T>[]

      The lists (along with the wrapped list) to compute the union of.

    Returns T[]

  • Produces a duplicate-free version of the wrapped list, using === to test object equality. If you know in advance that the wrapped list is sorted, passing true for isSorted will run a much faster algorithm. If you want to compute unique items based on a transformation, pass an iteratee function.

    Returns

    An array containing only the unique elements in the wrapped list.

    Parameters

    • Optional isSorted: boolean

      True if the wrapped list is already sorted, optional, default = false.

    • Optional iteratee: Iteratee<V, any, TypeOfCollection<V, never>>

      Transform the elements of the wrapped list before comparisons for uniqueness.

    • Optional cotext: any

    Returns T[]

  • Parameters

    Returns T[]

  • Wrapped type string.

    See

    _.uniqueId

    Returns string

  • The opposite of zip. Given the wrapped list of lists, returns a series of new arrays, the first of which contains all of the first elements in the wrapped lists, the second of which contains all of the second elements, and so on. (alias: transpose)

    Returns

    The unzipped version of the wrapped lists.

    Returns any[][]

  • Extracts the value of the wrapped object.

    Returns

    The value of the wrapped object.

    Returns V

  • Wrapped type object.

    See

    _.values

    Returns T[]

  • Looks through each value in the wrapped collection, returning an array of all the elements that match the key-value pairs listed in properties.

    Returns

    The elements in the wrapped collection that match properties.

    Parameters

    • properties: Partial<T>

      The properties to check for on the elements within the wrapped collection.

    Returns T[]

  • Returns a copy of the wrapped list with all instances of values removed.

    Returns

    An array that contains all elements of the wrapped list except for values.

    Parameters

    • Rest ...values: T[]

      The values to exclude from the wrapped list.

    Returns T[]

  • Wrapped type Function.

    See

    _.wrap

    Parameters

    • wrapper: Function

    Returns (() => Function)

      • (): Function
      • Wrapped type Function.

        See

        _.wrap

        Returns Function

  • Merges together the values of each of the lists (including the wrapped list) with the values at the corresponding position. Useful when you have separate data sources that are coordinated through matching list indexes.

    Returns

    The zipped version of the wrapped list and lists.

    Parameters

    • Rest ...lists: List<any>[]

    Returns any[][]