throttled-queue
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "throttled-queue", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Throttles arbitrary code to execute a maximum number of times per interval. Best for making throttled API requests.", | ||
@@ -5,0 +5,0 @@ "main": "throttled-queue.js", |
@@ -1,1 +0,1 @@ | ||
"use strict";(function(){var e,t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=t&&(e=t.throttledQueue);var o=function(e,t,o){o&&(t/=e,e=1);var l=[],n=Date.now(),u=function(){var o=n+t,r=Date.now();if(o>r)return clearTimeout(f),void(f=setTimeout(u,o-r));for(var i=0;l.length&&e>i;){var a=l[i++];a()}l=i<l.length?l.slice(i,l.length):[],n=Date.now(),f=setTimeout(u,t)},f=setTimeout(u,t);return function(e){l.push(e)}};o.noConflict=function(){return t.throttledQueue=e,o},"object"==typeof module&&module.exports?module.exports=o:"function"==typeof define&&define.amd?define([],function(){return o}):t.throttledQueue=o}).call(this); | ||
"use strict";(function(){var e,t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=t&&(e=t.throttledQueue);var o=function(e,t,o){o&&(t/=e,e=1),200>t&&console.warn("An interval of less than 200ms can create performance issues.");var n=[],l=Date.now(),u=function(){var o=l+t,f=Date.now();if(o>f)return clearTimeout(r),void(r=setTimeout(u,o-f));for(var i=n.splice(0,e),s=0;s<i.length;s++)i[s]();l=Date.now(),r=setTimeout(u,t)},r=setTimeout(u,t);return function(e){n.push(e)}};o.noConflict=function(){return t.throttledQueue=e,o},"object"==typeof module&&module.exports?module.exports=o:"function"==typeof define&&define.amd?define([],function(){return o}):t.throttledQueue=o}).call(this); |
Sorry, the diff of this file is not supported yet
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
49798