• This method is like _.flatMap except that it recursively flattens the mapped results.

    Type Parameters

    • T

    Parameters

    • collection:
          | undefined
          | null
          | Dictionary<T | ListOfRecursiveArraysOrValues<T>>
          | NumericDictionary<T | ListOfRecursiveArraysOrValues<T>>

      The collection to iterate over.

    Returns T[]

    Returns the new flattened array.

    4.7.0

    function duplicate(n) {
    return [[[n, n]]];
    }

    _.flatMapDeep([1, 2], duplicate);
    // => [1, 1, 2, 2]
  • Type Parameters

    • T
    • TResult

    Parameters

    • collection: undefined | null | List<T>
    • iteratee: ListIterator<T, TResult | ListOfRecursiveArraysOrValues<TResult>>

    Returns TResult[]

    _.flatMapDeep

  • Type Parameters

    • T extends object
    • TResult

    Parameters

    • collection: undefined | null | T
    • iteratee: ObjectIterator<T, TResult | ListOfRecursiveArraysOrValues<TResult>>

    Returns TResult[]

    _.flatMapDeep

  • Parameters

    • collection: undefined | null | object
    • iteratee: string

    Returns any[]

    _.flatMapDeep

  • Parameters

    • collection: undefined | null | object
    • iteratee: object

    Returns boolean[]

    _.flatMapDeep