Function map

  • Returns a new array containing the mapped values from iterable, in order, as defined by given mapper function. Equivalent to array.map and Array.from.

    Type Parameters

    • T

    • U

    Parameters

    • iterable: Iterable<T>
    • mapper: ((value, index, iterable) => U)
        • (value, index, iterable): U
        • Parameters

          • value: T
          • index: number
          • iterable: Iterable<T>

          Returns U

    Returns U[]