@daysnap/utils 0.0.80 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/throttle.js +1 -1
- package/lib/throttle.js +1 -1
- package/package.json +1 -1
package/es/throttle.js
CHANGED
package/lib/throttle.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.throttle = exports.throttleTrailing = exports.throttleLeading = void 0;
|
|
|
6
6
|
* 减少事件执行次数,有规律的执行,事件触发后立即执行
|
|
7
7
|
*/
|
|
8
8
|
function throttleLeading(fn, ms) {
|
|
9
|
-
let pre =
|
|
9
|
+
let pre = 0;
|
|
10
10
|
// eslint-disable-next-line func-names
|
|
11
11
|
return function (...args) {
|
|
12
12
|
const now = Date.now();
|