New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

debounce-now

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debounce-now

A tiny, zero-dependency debounce function for JavaScript and React.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

debounce-now

A tiny, zero-dependency debounce function for JavaScript and React. Useful for input handlers, API calls, and more.

Install

npm install debounce-now

Usage

import debounce from 'debounce-now';

const log = debounce((text) => console.log(text), 300);

log('Hello');
log('World');
// Only "World" will be logged after 300ms

Typescript Usage

debounce(fn: Function, delay?: number): Function
  • fn – The function to debounce
  • delay – Delay in milliseconds (default: 300)

Features

  • Runs a function after a short delay.
  • Ignores fast repeated calls.
  • Helps reduce extra work like API calls.
  • Useful in input fields, scroll, and resize.
  • You can set your own delay time.
  • Very small and easy to use.

Examples

  • Search inputs
  • Resize/scroll events
  • Button click limiters

Keywords

debounce

FAQs

Package last updated on 07 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts