Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/stream_observables/transforms/distinct.ts>distinct

A collection of observables built with ReadableStreams & friends.
Latest
function distinct
import { distinct } from "https://deno.land/x/stream_observables@v1.3/transforms/distinct.ts";

Returns a Transform where all subsequent repetitions of the same item are filtered out.

Parameters

optional
f: (a: T, b: T) => boolean = [UNSUPPORTED]

Function to check if two items are the same. By default strict equality is used.

Returns

Transform that emits some items from the original observable.