ng-http-rate-limiter
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,7 @@ | ||
1.0.3 | ||
----- | ||
* As a CommonJS module, this exports its module name. | ||
* Remove requirement of having Array#find available. | ||
1.0.2 | ||
@@ -2,0 +8,0 @@ ----- |
@@ -9,2 +9,3 @@ (function(root, factory) { | ||
} | ||
module.exports = 'ngHttpRateLimiter'; | ||
} else if (typeof define === 'function' && define.amd) { | ||
@@ -124,5 +125,10 @@ // AMD | ||
request: function(config) { | ||
var limiter = rateLimiterConfig.getLimiters().find(function(l) { | ||
return l.matches(config.url); | ||
}); | ||
var limiters = rateLimiterConfig.getLimiters(); | ||
var limiter; | ||
for (var i = 0; i < limiters.length; i++) { | ||
if (limiters[i].matches(config.url)) { | ||
limiter = limiters[i]; | ||
break; | ||
} | ||
} | ||
@@ -129,0 +135,0 @@ if (limiter) { |
{ | ||
"name": "ng-http-rate-limiter", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "$http rate limiting in Angular", | ||
@@ -5,0 +5,0 @@ "main": "ng-http-rate-limiter.js", |
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
19296
308