forked from sashin/sashinexists
run npm install to generate a package lock
This commit is contained in:
12
node_modules/dettle/dist/throttle.js
generated
vendored
Normal file
12
node_modules/dettle/dist/throttle.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/* IMPORT */
|
||||
import debounce from './debounce.js';
|
||||
/* MAIN */
|
||||
const throttle = (fn, wait = 1, options) => {
|
||||
return debounce(fn, wait, {
|
||||
leading: options?.leading ?? true,
|
||||
trailing: options?.trailing ?? true,
|
||||
maxWait: wait
|
||||
});
|
||||
};
|
||||
/* EXPORT */
|
||||
export default throttle;
|
||||
Reference in New Issue
Block a user