• Creates an array of values by running each element in collection through iteratee. The iteratee is invoked with three arguments: (value, index|key, collection).

    Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, _.reject, and _.some.

    The guarded methods are: ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, sample, some, sum, uniq, and words

    Type Parameters

    • T
    • TResult

    Parameters

    • collection: undefined | null | T[]

      The collection to iterate over.

    • iteratee: ArrayIterator<T, TResult>

      The function invoked per iteration.

    Returns TResult[]

    Returns the new mapped array.

  • Type Parameters

    • T
    • TResult

    Parameters

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

    Returns TResult[]

    _.map

  • Type Parameters

    • T

    Parameters

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

    Returns T[]

    _.map

  • Type Parameters

    • T extends object
    • TResult

    Parameters

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

    Returns TResult[]

    _.map

  • Type Parameters

    • T
    • K extends string | number | symbol

    Parameters

    • collection:
          | undefined
          | null
          | Dictionary<T>
          | NumericDictionary<T>
    • iteratee: K

    Returns T[K][]

    _.map

  • Type Parameters

    • T

    Parameters

    • collection:
          | undefined
          | null
          | Dictionary<T>
          | NumericDictionary<T>
    • Optionaliteratee: string

    Returns any[]

    _.map

  • Type Parameters

    • T

    Parameters

    • collection:
          | undefined
          | null
          | Dictionary<T>
          | NumericDictionary<T>
    • Optionaliteratee: object

    Returns boolean[]

    _.map