Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

debounce

import { debounce } from "https://raw.githubusercontent.com/surma/observables-with-streams/28c55be6d855780c677fd1f4ba975f4d3144891d/src/index.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.

function debounce<T>(ms: number): Transform<T>;
§
debounce<T>(ms: number): Transform<T>
[src]

§Type Parameters

§Parameters

§
ms: number
[src]

Milliseconds to wait before emitting an item.

§Return Type

§

Transform that emits some items from the original observable.