ixfx
    Preparing search index...

    Function unique

    Returns unique items from an iterable or array of iterables.

    const data = [ 'apples', 'oranges' ]
    const data2 = [ 'oranges', 'pears' ]
    const unique = [...unique([data,data2]];
    // Yields: [ 'apples', 'oranges', 'pears' ]

    Uses object reference to compare values. Use uniqueByValue if this doesn't suffice.

    Iterable, or array of iterables

    • Type Parameters

      • V

      Parameters

      • iterable: Iterable<V, any, any> | Iterable<V, any, any>[]

      Returns Generator<V>

    • Type Parameters

      • V

      Parameters

      • iterable: AsyncIterable<V, any, any> | AsyncIterable<V, any, any>[]

      Returns AsyncGenerator<V>