Skip to Content
🎉 Coral now has an MCP Server, check out the docs
DocumentationUtilsdebounce

debounce

A helper function that creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.

Import

import { debounce } from '@octopus-energy/utils';

Usage

const fn = () => console.log('debounced'); const debouncedFn = debounce(fn, 1000);

Args

NameDescriptionTypeDefaultRequired
functionThe function to debounce.Functiontrue
waitingTimeInMsThe number of milliseconds to delay.number150true
Last updated on