Skip to main content

@std/async@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)

Functions

f
debounce<T extends Array<any>>(
fn: (
this: DebouncedFunction<T>,
...args: T
) => void
,
wait: number
): DebouncedFunction<T>

Creates a debounced function that delays the given func by a given wait time in milliseconds. If the method is called again before the timeout expires, the previous call will be aborted.

Interfaces

I

A debounced function that will be delayed by a given wait time in milliseconds. If the method is called again before the timeout expires, the previous call will be aborted.

  • clear(): void

    Clears the debounce timeout and omits calling the debounced function.

  • flush(): void

    Clears the debounce timeout and calls the debounced function immediately.

  • pending: boolean

    Returns a boolean whether a debounce call is pending or not.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/async

Import symbol

import * as mod from "@std/async/debounce";
or

Import directly with a jsr specifier

import * as mod from "jsr:@std/async/debounce";