Skip to main content
Home

Built and signed on GitHub Actions

A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.

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
a week ago (1.39.7)
interface DebouncedFunc

Type Parameters

T extends (...args: any[]) => any

Call Signatures

(...args: Parameters<T>): ReturnType<T> | undefined

Call the original function, but applying the debounce rules.

If the debounced function can be run immediately, this calls it and returns its return value.

Otherwise, it returns the return value of the last invocation, or undefined if the debounced function was not invoked yet.

Methods

cancel(): void

Throw away any pending invocation of the debounced function.

flush(): ReturnType<T> | undefined

If there is a pending invocation of the debounced function, invoke it immediately and return its return value.

Otherwise, return the value from the last invocation, or undefined if the debounced function was never invoked.

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:@es-toolkit/es-toolkit

Import symbol

import { type DebouncedFunc } from "@es-toolkit/es-toolkit/compat";
or

Import directly with a jsr specifier

import { type DebouncedFunc } from "jsr:@es-toolkit/es-toolkit/compat";

Add Package

pnpm i jsr:@es-toolkit/es-toolkit
or (using pnpm 10.8 or older)
pnpm dlx jsr add @es-toolkit/es-toolkit

Import symbol

import { type DebouncedFunc } from "@es-toolkit/es-toolkit/compat";

Add Package

yarn add jsr:@es-toolkit/es-toolkit
or (using Yarn 4.8 or older)
yarn dlx jsr add @es-toolkit/es-toolkit

Import symbol

import { type DebouncedFunc } from "@es-toolkit/es-toolkit/compat";

Add Package

vlt install jsr:@es-toolkit/es-toolkit

Import symbol

import { type DebouncedFunc } from "@es-toolkit/es-toolkit/compat";

Add Package

npx jsr add @es-toolkit/es-toolkit

Import symbol

import { type DebouncedFunc } from "@es-toolkit/es-toolkit/compat";

Add Package

bunx jsr add @es-toolkit/es-toolkit

Import symbol

import { type DebouncedFunc } from "@es-toolkit/es-toolkit/compat";