yta
    Preparing search index...

    Function unique

    • Filter items in the iterator such that no two items are the same.

      import { pipe } from "yta";
      import { of, toArray, unique } from "yta/async";

      await pipe(
      of(1, 2, 2, 3, 4, 5, 4),
      unique(),
      toArray(),
      );
      // => [1, 2, 3, 4, 5]

      Type Parameters

      • A

        The item type

      Returns (items: AsyncIterable<A>) => AsyncGenerator<A, void>

      1.1.0