Takaro - v0.4.11
    Preparing search index...

    Function flatMapDepth

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

      Type Parameters

      • T

      Parameters

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

        The collection to iterate over.

      Returns T[]

      Returns the new flattened array.

      4.7.0

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

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

      • T
      • TResult

      Parameters

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

      Returns TResult[]

      _.flatMapDepth

    • Type Parameters

      • T extends object
      • TResult

      Parameters

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

      Returns TResult[]

      _.flatMapDepth

    • Parameters

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

      Returns any[]

      _.flatMapDepth

    • Parameters

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

      Returns boolean[]

      _.flatMapDepth