Type Parameters

  • T

  • V = T[]

Hierarchy

  • _Chain

Properties

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

    • (n?: number): _Chain<T, T[]>
    • See

      rest

      Parameters

      • Optional n: number

      Returns _Chain<T, T[]>

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

Type declaration

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

Type declaration

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

Type declaration

head: {
    (): _ChainSingle<undefined | T>;
    (n: number): _Chain<T, T[]>;
}

Type declaration

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

Type declaration

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

      contains

      Parameters

      • value: any
      • Optional fromIndex: number

      Returns _ChainSingle<boolean>

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

Type declaration

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

      contains

      Parameters

      • value: any
      • Optional fromIndex: number

      Returns _ChainSingle<boolean>

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

Type declaration

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

Type declaration

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

Type declaration

    • (n?: number): _Chain<T, T[]>
    • See

      rest

      Parameters

      • Optional n: number

      Returns _Chain<T, T[]>

take: {
    (): _ChainSingle<undefined | T>;
    (n: number): _Chain<T, T[]>;
}

Type declaration

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

Type declaration

Methods

  • Wrapped type number.

    See

    _.after

    Parameters

    • func: Function

    Returns _Chain<T, T[]>

  • Wrapped type object.

    See

    _.allKeys

    Returns _Chain<string, string[]>

  • Wrapped type number.

    See

    _.before

    Parameters

    • fn: Function

    Returns _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.bind

    Parameters

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

    Returns _Chain<T, T[]>

  • Wrapped type object.

    See

    _.bindAll

    Parameters

    • Rest ...methodNames: string[]

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around the contents of the wrapped list in chunks no greater than length in size.

    Parameters

    • length: number

      The maximum size of the chunks.

    Returns _Chain<T[], T[][]>

  • Wrapped type any[].

    See

    _.clone

    Returns _Chain<T, 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

    A chain wrapper around an array containing the elements of the wrapped list without falsy values.

    Returns _Chain<Exclude<T, AnyFalsy>, Exclude<T, AnyFalsy>[]>

  • Wrapped type Function[].

    See

    _.compose

    Parameters

    • Rest ...functions: Function[]

    Returns _Chain<T, T[]>

  • Returns a new array comprised of the array on which it is called joined with the array(s) and/or value(s) provided as arguments.

    Returns

    A new array comprised of the array on which it is called

    Parameters

    • Rest ...arr: T[][]

      Arrays and/or values to concatenate into a new array. See the discussion below for details.

    Returns _Chain<T, T[]>

  • Wrapped type any.

    See

    _.constant

    Returns _Chain<T, 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

    A chain wrapper around true if value is present in the wrapped collection after fromIndex, otherwise around 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 _ChainSingle<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 chain wrapper around 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 iterator: Iteratee<V, string | number, TypeOfCollection<V, never>>
    • Optional context: any

      this object in iteratee, optional.

    Returns _Chain<number, Dictionary<number>>

  • Wrapped type any.

    See

    _.create

    Parameters

    • Optional props: object

    Returns _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.debounce

    Parameters

    • wait: number
    • Optional immediate: boolean

    Returns _Chain<T, T[]>

  • Wrapped type object.

    See

    _.defaults

    Parameters

    • Rest ...defaults: any[]

    Returns _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.defer

    Parameters

    • Rest ...args: any[]

    Returns _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.delay

    Parameters

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

    Returns _Chain<T, T[]>

  • See

    _.delay

    Parameters

    • Rest ...args: any[]

    Returns _Chain<T, T[]>

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

    Returns

    A chain wrapper around 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 _Chain<T, 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

    A chain wrapper around 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 _Chain<T, V>

  • Wrapped type string.

    See

    _.escape

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around true if all elements pass the truth test, otherwise around false.

    Parameters

    • Optional iterator: Iteratee<V, boolean, TypeOfCollection<V, never>>
    • Optional context: any

      this object in iteratee, optional.

    Returns _ChainSingle<boolean>

  • Wrapped type object.

    See

    _.extend

    Parameters

    • Rest ...sources: any[]

    Returns _Chain<T, T[]>

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

    Returns

    A chain wrapper around the set of values that pass the truth test.

    Parameters

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

      The truth test to apply.

    • Optional context: any

      this object in iteratee, optional.

    Returns _Chain<T, 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

    A chain wrapper around 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 _ChainSingle<undefined | T>

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

    Returns

    A chain wrapper around 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 _ChainSingle<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 _ChainSingle<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

    A chain wrapper around 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 _ChainSingle<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

    A chain wrapper around 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 _ChainSingle<undefined | T>

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

    Returns

    A chain wrapper around the first n elements of the wrapped list or around the first element if n is omitted.

    Returns _ChainSingle<undefined | T>

  • Parameters

    • n: number

    Returns _Chain<T, T[]>

  • Flattens a nested list (the nesting can be to any depth). If you pass true or 1 as the depth, the list will only be flattened a single level. Passing a greater number will cause the flattening to descend deeper into the nesting hierarchy. Omitting the depth argument, or passing false or Infinity, flattens the list all the way to the deepest nesting level.

    Returns

    A chain wrapper around the flattened list.

    Parameters

    • depth: true | 1

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

    Returns _Chain<ListItemOrSelf<T>, ListItemOrSelf<T>[]>

  • Parameters

    • Optional depth: number | false

    Returns _Chain<DeepestListItemOrSelf<T>, DeepestListItemOrSelf<T>[]>

  • Wrapped type object.

    See

    _.functions

    Returns _Chain<T, T[]>

  • Wrapped type any.

    See

    _.get

    Parameters

    • path: string | string[]

    Returns _Chain<undefined | TypeOfCollection<V, never>, undefined | T>

  • Type Parameters

    • U

    Parameters

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

    Returns _Chain<TypeOfCollection<V, never> | U, T | U>

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

    Returns

    A chain wrapper around 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 _Chain<T[], Dictionary<T[]>>

  • Wrapped type object.

    See

    _.has

    Parameters

    • key: string

    Returns _Chain<T, T[]>

  • Wrapped type any.

    See

    _.identity

    Returns _Chain<T, T[]>

  • Given the warpped collection and an iteratee function that returns a key for each element in 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 chain wrapper around 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 _Chain<T, 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

    A chain wrapper around 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 _ChainSingle<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

    A chain wrapper around 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 _Chain<T, 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

    A chain wrapper around 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 _Chain<T, T[]>

  • Wrapped type object.

    See

    _.invert

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around 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 _Chain<any, any[]>

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

    Returns

    True if the wrapped object is an Arguments object, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is an Array.

    Returns

    True if the wrapped object is an Array, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is an ArrayBuffer.

    Returns

    True if the wrapped object is an ArrayBuffer, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a Boolean.

    Returns

    True if the wrapped object is a Boolean, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a DataView.

    Returns

    True if the wrapped object is a DataView, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a Date.

    Returns

    True if the wrapped object is a Date, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

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

    Returns

    True if the wrapped object is a DOM element, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<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. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<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. The result will be wrapped in a chain wrapper.

    Parameters

    • other: any

      Compare to the wrapped object.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a Error.

    Returns

    True if the wrapped object is a Error, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

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

    Returns

    True if the wrapped object is a finite Number. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a Function.

    Returns

    True if the wrapped object is a Function, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<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. The result will be wrapped in a chain wrapper.

    Parameters

    • properties: any

      The properties to check for in the wrapped object.

    Returns _ChainSingle<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. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is null.

    Returns

    True if the wrapped object is null, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

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

    Returns

    True if the wrapped object is a Number, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<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. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a RegExp.

    Returns

    True if the wrapped object is a RegExp, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a String.

    Returns

    True if the wrapped object is a String, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a Symbol.

    Returns

    True if the wrapped object is a Symbol, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is a TypedArray.

    Returns

    True if the wrapped object is a TypedArray, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Returns true if the wrapped object is undefined.

    Returns

    True if the wrapped object is undefined, otherwise false. The result will be wrapped in a chain wrapper.

    Returns _ChainSingle<boolean>

  • Wrapped type string|Function|Object.

    See

    _.iteratee

    Parameters

    • Optional context: any

    Returns _Chain<T, T[]>

  • Join all elements of an array into a string.

    Returns

    The string conversions of all array elements joined into one string.

    Parameters

    • Optional separator: any

      Optional. Specifies a string to separate each element of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma.

    Returns _ChainSingle<T>

  • Wrapped type object.

    See

    _.keys

    Returns _Chain<string, string[]>

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

    Returns

    A chain wrapper around the last n elements of the wrapped list or around the last element if n is omitted.

    Returns _ChainSingle<undefined | T>

  • Parameters

    • n: number

    Returns _Chain<T, 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

    A chain wrapper around 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 _ChainSingle<number>

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

    Returns

    A chain wrapper around 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 _Chain<IterateeResult<I, T>, IterateeResult<I, T>[]>

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

    Returns

    A chain wrapper around 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 _Chain<IterateeResult<I, TypeOfCollection<V, any>>, { [ K in string | number | symbol]: IterateeResult<I, V[K]> }>

  • Wrapped type any[].

    See

    _.matcher

    Returns _Chain<T, T[]>

  • Wrapped type any[].

    See

    _.matches

    Returns _Chain<T, 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

    A chain wrapper around the maximum element within the wrapped collection or around -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 _ChainSingle<number | T>

  • Wrapped type Function.

    See

    _.memoize

    Parameters

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

          • n: any

          Returns string

    Returns _Chain<T, T[]>

  • See

    _.functions

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around the minimum element within the wrapped collection or around 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 _ChainSingle<number | T>

  • Wrapped type object.

    See

    _.mixin

    Returns _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.negate

    Returns _Chain<T, T[]>

  • Wrapped type any.

    See

    _.noop

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around 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 _Chain<undefined | TValue, Dictionary<undefined | TValue>>

  • Returns _Chain<PairValue<T>, Dictionary<PairValue<T>>>

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

    Returns

    A chain wrapper around 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 _ChainSingle<_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 chain wrapper around a copy of the wrapped object without the keys selected by iterator.

    Parameters

    Returns _ChainSingle<Partial<V>>

  • Wrapped type Function.

    See

    _.once

    Returns _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.partial

    Parameters

    • Rest ...args: any[]

    Returns _Chain<T, T[]>

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

    Returns

    A chain wrapper around 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 _Chain<T[], [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 chain wrapper around 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 _ChainSingle<_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 chain wrapper around a copy of the wrapped object with only the keys selected by iterator.

    Parameters

    Returns _ChainSingle<Partial<V>>

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

    Returns

    A chain wrapper around 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 _Chain<PropertyTypeOrAny<T, K>, PropertyTypeOrAny<T, K>[]>

  • Removes the last element from an array and returns that element.

    Returns

    Returns the popped element.

    Returns _ChainSingle<T>

  • Wrapped type string.

    See

    _.property

    Returns _Chain<T, T[]>

  • Wrapped type object.

    See

    _.propertyOf

    Returns _Chain<T, T[]>

  • Adds one or more elements to the end of an array and returns the new length of the array.

    Returns

    The array with the element added to the end.

    Parameters

    • Rest ...item: T[]

      The elements to add to the end of the array.

    Returns _Chain<T, T[]>

  • Wrapped type number.

    See

    _.random

    Returns _Chain<T, T[]>

  • Wrapped type number.

    See

    _.random

    Parameters

    • max: number

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around 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 _Chain<number, 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

    A chain wrapper around 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 _ChainSingle<TResult>

  • Type Parameters

    Parameters

    Returns _ChainSingle<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

    A chain wrapper around 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 _Chain<T, 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

    A chain wrapper around the elements of the wrapped list from index to the end of the list.

    Parameters

    • Optional n: number

    Returns _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.once

    Parameters

    • Optional startIndex: number

    Returns _Chain<T, T[]>

  • Wrapped type object.

    See

    _.result

    Parameters

    • property: string
    • Optional defaultValue: any

    Returns _Chain<T, T[]>

  • Reverses an array in place. The first array element becomes the last and the last becomes the first.

    Returns

    The reversed array.

    Returns _Chain<T, T[]>

  • 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 chain wrapper around 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 _Chain<T, T[]>

  • Returns _ChainSingle<undefined | T>

  • Removes the first element from an array and returns that element. This method changes the length of the array.

    Returns

    The shifted element.

    Returns _ChainSingle<T>

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

    Returns

    A chain wrapper around a shuffled copy of the wrapped collection.

    Returns _Chain<T, T[]>

  • Determines the number of values in the wrapped collection.

    Returns

    A chain wrapper around the number of values in the wrapped collection.

    Returns _ChainSingle<number>

  • Returns a shallow copy of a portion of an array into a new array object.

    Returns

    A shallow copy of a portion of an array into a new array object.

    Parameters

    • start: number

      Zero-based index at which to begin extraction.

    • Optional end: number

      Optional. Zero-based index at which to end extraction. slice extracts up to but not including end.

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around true if any element passed the truth test, otherwise around false.

    Parameters

    • Optional iterator: Iteratee<V, boolean, TypeOfCollection<V, never>>
    • Optional context: any

      this object in iteratee, optional.

    Returns _ChainSingle<boolean>

  • Sorts the elements of an array in place and returns the array. The sort is not necessarily stable. The default sort order is according to string Unicode code points.

    Returns

    The sorted array.

    Parameters

    • Optional compareFn: ((a: T, b: T) => boolean)

      Optional. Specifies a function that defines the sort order. If omitted, the array is sorted according to each character's Unicode code point value, according to the string conversion of each element.

        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns _Chain<T, T[]>

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

    Returns

    A chain wrapper around 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 _Chain<T, 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

    A chain wrapper around 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 _ChainSingle<number>

  • Changes the content of an array by removing existing elements and/or adding new elements.

    Returns

    An array containing the deleted elements. If only one element is removed, an array of one element is returned. If no elements are removed, an empty array is returned.

    Parameters

    • index: number

      Index at which to start changing the array. If greater than the length of the array, actual starting index will be set to the length of the array. If negative, will begin that many elements from the end.

    • quantity: number

      An integer indicating the number of old array elements to remove. If deleteCount is 0, no elements are removed. In this case, you should specify at least one new element. If deleteCount is greater than the number of elements left in the array starting at index, then all of the elements through the end of the array will be deleted.

    • Rest ...items: T[]

      The element to add to the array. If you don't specify any elements, splice will only remove elements from the array.

    Returns _Chain<T, T[]>

  • Wrapped type object.

    See

    _.tap

    Parameters

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

          • Rest ...as: any[]

          Returns any

    Returns _Chain<T, V>

  • Wrapped type Function.

    See

    _.throttle

    Parameters

    Returns _Chain<T, T[]>

  • 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 _Chain<T, T[]>

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

    Returns

    A chain wrapper around an array containing the elements of the wrapped collection.

    Returns _Chain<T, T[]>

  • A string representing the specified array and its elements.

    Returns

    A string representing the specified array and its elements.

    Returns _ChainSingle<T>

  • Returns _Chain<any[], any[][]>

  • Wrapped type string.

    See

    _.unescape

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around 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 _Chain<T, 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

    A chain wrapper around 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 context: any

      'this' object in iteratee, optional.

    Returns _Chain<T, T[]>

  • Parameters

    Returns _Chain<T, T[]>

  • Wrapped type string.

    See

    _.uniqueId

    Returns _Chain<T, T[]>

  • Adds one or more elements to the beginning of an array and returns the new length of the array.

    Returns

    The array with the element added to the beginning.

    Parameters

    • Rest ...items: T[]

      The elements to add to the front of the array.

    Returns _Chain<T, T[]>

  • 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

    A chain wrapper around the unzipped version of the wrapped lists.

    Returns _Chain<any[], any[][]>

  • Extracts the value of the wrapped object.

    Returns

    The value of the wrapped object.

    Returns V

  • Wrapped type object.

    See

    _.values

    Returns _Chain<any, any[]>

  • 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

    A chain wrapper around 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 _Chain<T, T[]>

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

    Returns

    A chain wrapper around 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 _Chain<T, T[]>

  • Wrapped type Function.

    See

    _.wrap

    Parameters

    • wrapper: Function

    Returns (() => _Chain<T, T[]>)

      • (): _Chain<T, T[]>
      • Wrapped type Function.

        See

        _.wrap

        Returns _Chain<T, T[]>

  • 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

    A chain wrapper around the zipped version of the wrapped list and lists.

    Parameters

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

    Returns _Chain<any[], any[][]>