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

x/stream_observables/transforms/debounce.ts>debounce

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

Returns a Transform where items are only emitted if ms milliseconds pass without new a new emit by the source observable. If a new value is emitted, the “cooldown” is restarted and the old value is discarded.

Parameters

ms: number

Milliseconds to wait before emitting an item.

Returns

Transform that emits some items from the original observable.