Skip to main content
Home

@std/async@1.0.13
Built and signed on GitHub Actions

Utilities for asynchronous operations, like delays, debouncing, or pooling

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 days ago (1.0.13)
interface DebouncedFunction

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.

Type Parameters

T extends Array<unknown>

Call Signatures

(...args: T): void

Properties

readonly
pending: boolean

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

Methods

clear(): void

Clears the debounce timeout and omits calling the debounced function.

flush(): void

Clears the debounce timeout and calls the debounced function immediately.

New Ticket: 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 { type DebouncedFunction } from "@std/async/debounce";
or

Import directly with a jsr specifier

import { type DebouncedFunction } from "jsr:@std/async/debounce";

Add Package

pnpm i jsr:@std/async
or (using pnpm 10.8 or older)
pnpm dlx jsr add @std/async

Import symbol

import { type DebouncedFunction } from "@std/async/debounce";

Add Package

yarn add jsr:@std/async
or (using Yarn 4.8 or older)
yarn dlx jsr add @std/async

Import symbol

import { type DebouncedFunction } from "@std/async/debounce";

Add Package

npx jsr add @std/async

Import symbol

import { type DebouncedFunction } from "@std/async/debounce";

Add Package

bunx jsr add @std/async

Import symbol

import { type DebouncedFunction } from "@std/async/debounce";