ixfx
    Preparing search index...

    Function map

    • Maps an iterable through function f

      // For every input value, multiply it by itself
      map([1, 2, 3], e => e*e)
      // Yields: 1, 4, 9

      It can also be used to transform types:

      map([1, 2, 3], e => { value: e });
      // Yields: { value: 1 }, { value: 2 }, { value: 3 }

      Type Parameters

      • V
      • X

      Parameters

      • it: AsyncIterable<V>
      • f: (v: V) => X

      Returns AsyncGenerator<Awaited<X>, void, unknown>