Function unique

  • Returns a single instance of each item in the iterable or asynchronous iterable.

    Example

    unique([1, 2, 3, 4, 1, 2, 3, 4]); // [1, 2, 3, 4]
    

    Type Parameters

    • Iterable extends IsomorphicIterable

    Parameters

    • iterable: Iterable

      Iterable to be filtered.

    Returns GeneratorOutput<Iterable>

    Generators with a single instance of each item of the iterable.