Comparing version 0.0.24 to 0.0.25
{ | ||
"name": "webdetta", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"author": "Fedot Kriutchenko <fodyadev@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -18,5 +18,18 @@ const AsyncFunction = (async () => {}).constructor; | ||
let p; | ||
return (...a) => ( | ||
p ??= Promise.resolve().then(() => p = null).then(() => f(...a)) | ||
); | ||
return function () { | ||
p ??= Promise.resolve() | ||
.then(() => p = null) | ||
.then(() => f.apply(this, arguments)); | ||
return p; | ||
} | ||
} | ||
throttle.T = (delay, f) => { | ||
let t; | ||
return function () { | ||
clearTimeout(t); | ||
return new Promise((resolve) => { | ||
t = setTimeout(() => resolve(f.apply(this, arguments)), delay); | ||
}); | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24676
715