@szilanor/stream
    Preparing search index...

    Function distinctUntilChanged

    • Returns an OperationFunction that yields elements from the source that are distinct from the previous element.

      Type Parameters

      • T

        Type of items in the source.

      Parameters

      Returns OperationFunction<T, T>

      An OperationFunction that yields elements from the source that are distinct from the previous element.

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