@szilanor/stream
    Preparing search index...

    Function distinctUntilChangedAsync

    • Returns an AsyncOperationFunction that yields only entries of the source Iterable without duplicates.

      Type Parameters

      • T

        The type of the elements in the source Iterable.

      Parameters

      • OptionalequalsFunction: EqualsFunction<T>

        The function to use to compare the elements.

      Returns AsyncOperationFunction<T, T>

      An AsyncOperationFunction that yields only entries of the source Iterable without duplicates.

      const result = distinctUntilChangedAsync<number>([1, 2, 2, 3], (a, b) => a === b);
      console.log(result); // [1, 2, 3]