segal-decorators
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -9,3 +9,2 @@ "use strict"; | ||
function decorator(fn, timeMs) { | ||
let timeout; | ||
let nextCall; | ||
@@ -18,9 +17,4 @@ return function (...args) { | ||
} | ||
else { | ||
const remaining = nextCall - now; | ||
timeout && clearTimeout(timeout); | ||
timeout = setTimeout(() => fn.apply(this, args), remaining); | ||
} | ||
}; | ||
} | ||
//# sourceMappingURL=throttle.js.map |
{ | ||
"name": "segal-decorators", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Bunch of useful decorators", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
58247
756