superagent-defaults
Advanced tools
Comparing version 0.1.1 to 0.1.2
19
index.js
@@ -7,3 +7,2 @@ /** | ||
, methods = require('methods') | ||
, each = require('each-component') | ||
, Emitter = require('emitter-component'); | ||
@@ -52,4 +51,4 @@ | ||
Context.prototype.applyHeaders = function(req) { | ||
each(this.headers, function(headerArgs) { | ||
req.set.apply(req, headerArgs); | ||
each(this.headers, function(header) { | ||
req.set.apply(req, header); | ||
}); | ||
@@ -77,1 +76,15 @@ } | ||
}); | ||
/** | ||
* Iterate array-ish. | ||
* | ||
* @param {Array|Object} arr | ||
* @param {Function} fn | ||
* @api private | ||
*/ | ||
function each(arr, fn) { | ||
for (var i = 0; i < arr.length; ++i) { | ||
fn(arr[i], i); | ||
} | ||
} |
{ | ||
"name": "superagent-defaults", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Create some defaults for superagent requests", | ||
@@ -22,3 +22,2 @@ "main": "index.js", | ||
"superagent": "~0.14.9", | ||
"each-component": "CamShaft/each", | ||
"methods": "0.0.1", | ||
@@ -25,0 +24,0 @@ "emitter-component": "~1.0.1" |
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
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
3687
3
95
0
- Removedeach-component@CamShaft/each