当前位置:网站首页>throttle-debounce. JS: a small anti shake throttling function library
throttle-debounce. JS: a small anti shake throttling function library
2022-06-24 23:33:00 【Pengshiyu】
Throttle and debounce functions.
file :
- https://github.com/niksy/throttle-debounce
- https://www.npmjs.com/package/throttle-debounce
- https://www.jsdelivr.com/package/npm/throttle-debounce
Node.js
install
npm install throttle-debounce --save
Example
import {
throttle, debounce } from 'throttle-debounce';
// delay 100 or 250
throttle(delay, callback, {
noLeading=false, noTrailing=false, debounceMode })
debounce(delay, callback, {
atBegin=false })
CDN
<!-- introduce throttle-debounce -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/umd/index.min.js"></script>
<script> const throttleFunc = throttleDebounce.throttle(1000, ()=>{
}); const debounceFunc = throttleDebounce.debounce(1000, ()=>{
}); </script>
边栏推荐
- Morris traversal
- golang map clear
- The R language uses the matchit package for propensity matching analysis and match The data function constructs the matched sample set, and judges the balance of all covariates in the sample after the
- [JS] - [linked list - application] - learning notes
- Selective sort method
- [JS] - [array application] - learning notes
- 7-9 treasure hunt route
- Hyperledger Fabric 2. X dynamic update smart contract
- Collation of Digital IC design experience (II)
- What you must know about time series database!
猜你喜欢

What good smart home brands in China support homekit?
![[JS] - [array application] - learning notes](/img/8a/808fde0cc86e0ec5e1f5558ba196b4.png)
[JS] - [array application] - learning notes

Installing IBM CPLEX academic edition | CONDA installing CPLEX

还在用 SimpleDateFormat 做时间格式化?小心项目崩掉

Simpledateformat concrete classes for formatting and parsing dates

我的为人处事真的有问题吗?

明天就是PMP考试了(6月25日),这些大家都了解了吗?

斐波那契

Yyds dry goods counting uses xshell to implement agent function

go 语言指针,值引用和指针引用
随机推荐
R语言dplyr包select函数将dataframe数据中的指定数据列移动到dataframe数据列中的第一列(首列)
STM32CubeIDE SWV功能使用方法
企业数据防泄露解决方案分享
点的螺旋距离
[basic knowledge] ~ half adder & full adder
What good smart home brands in China support homekit?
Simple use of libnum Library (hexadecimal string conversion)
Unveiling the secrets of the Winter Olympics | smartbi's partners supported the "front and back" of the Beijing Winter Olympics
File contains vulnerability issues
Redis source code analysis skip list
Huawei machine learning service speech recognition function enables applications to paint "sound" and color
常用正则表达式
Morris traverse
国内有哪些好的智能家居品牌支持homekit?
golang convert json string to map
Selective sort method
[introduction to UVM== > episode_8] ~ sequence and sequencer, sequence hierarchy
MySQL 表的增删查改
The R language uses the matchit package for propensity matching analysis and match The data function constructs the matched sample set, and judges the balance of all covariates in the sample after the
372. 棋盘覆盖