Skip to content

Commit

Permalink
Switching Array.forEach() with array.each()
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Nov 28, 2016
1 parent ce32394 commit 8931d88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/iterate.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function iterate (obj, fn) {
fn.call(obj, obj[i], i);
});
} else {
obj.forEach(fn);
array.each(obj, fn);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rateHeaders = [
];

function decorate (req, res, next) {
var obj = req.server.tenso;
const obj = req.server.tenso;

req.protect = false;
req.protectAsync = false;
Expand Down Expand Up @@ -148,7 +148,7 @@ function rate (req, res, next) {
results = server.tenso.rate(req, config.override);
good = results.shift();

rateHeaders.forEach((i, idx) => {
array.each(rateHeaders, (i, idx) => {
res.setHeader(i, results[idx]);
});

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an elastic REST API gateway for node.js",
"version": "4.1.8",
"version": "4.1.9",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down Expand Up @@ -45,8 +45,8 @@
"tiny-uuid4": "~1.0.1",
"tiny-xml": "~1.0.6",
"turtle.io": "~7.3.3",
"yamljs": "~0.2.8",
"uws": "~0.7.0"
"uws": "~0.7.0",
"yamljs": "~0.2.8"
},
"devDependencies": {
"grunt": "~0.4.5",
Expand Down

0 comments on commit 8931d88

Please sign in to comment.