Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/throttle-debounce

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/throttle-debounce

TypeScript definitions for throttle-debounce

  • 5.0.2
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/throttle-debounce?

@types/throttle-debounce provides TypeScript type definitions for the throttle-debounce library, which offers utility functions for throttling and debouncing function calls. These utilities are useful for controlling the rate at which a function is executed, especially in response to events like scrolling or resizing.

What are @types/throttle-debounce's main functionalities?

Throttle

The throttle function ensures that the provided function is executed at most once every specified number of milliseconds (200ms in this case). This is useful for performance optimization in scenarios like handling scroll events.

const { throttle } = require('throttle-debounce');

const throttledFunction = throttle(200, () => {
  console.log('Throttled function executed');
});

window.addEventListener('scroll', throttledFunction);

Debounce

The debounce function ensures that the provided function is executed only after a specified number of milliseconds (200ms in this case) have passed since the last time the function was invoked. This is useful for scenarios like handling resize events.

const { debounce } = require('throttle-debounce');

const debouncedFunction = debounce(200, () => {
  console.log('Debounced function executed');
});

window.addEventListener('resize', debouncedFunction);

Other packages similar to @types/throttle-debounce

FAQs

Package last updated on 07 Nov 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc