# Function map

- map<T, U>(iterable, f): AsyncIterable<U>

- The equivalent of Array.prototype.map for async iterators.

  #### Type Parameters

  - T
  - U

  #### Parameters

  - iterable: AsyncIterable<T, any, any>

    The async iterable to map over.

  - f: ((x: T, index?: number) => U | PromiseLike<U>)

    The mapping function.

    - - (x, index?): U | PromiseLike<U>

      - #### Parameters

        - x: T
        - `Optional` index: number

        #### Returns U | PromiseLike<U>

  #### Returns AsyncIterable<U>