yta
    Preparing search index...

    Function of

    • Create an async iterator by resolving each of the arguments in order.

      import { of } from "yta";

      const arr = [];
      const items = of(
      Promise.resolve("a"),
      Promise.resolve("b"),
      Promise.resolve("c"),
      );

      for await (item of items) {
      arr.push(item);
      }

      arr;
      // => ["a", "b", "c"]

      Type Parameters

      • T

      Parameters

      • ...items: (T | Promise<T>)[]

      Returns AsyncIterable<T, any, any>