Skip to content

Commit 220eed8

Browse files
committed
review changes
1 parent 35524e6 commit 220eed8

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎lib/RuleSet.js‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ module.exports = class RuleSet {
287287
if(!condition)
288288
throw new Error("Expected condition but got falsy value");
289289
if(typeof condition === "string") {
290-
return (str) => str.indexOf(condition) === 0;
290+
return str => str.indexOf(condition) === 0;
291291
}
292292
if(typeof condition === "function") {
293293
return condition;
@@ -380,16 +380,14 @@ module.exports = class RuleSet {
380380
});
381381
}
382382

383-
let i;
384-
385383
if(rule.rules) {
386-
for(i = 0; i < rule.rules.length; i++) {
384+
for(let i = 0; i < rule.rules.length; i++) {
387385
this._run(data, rule.rules[i], result);
388386
}
389387
}
390388

391389
if(rule.oneOf) {
392-
for(i = 0; i < rule.oneOf.length; i++) {
390+
for(let i = 0; i < rule.oneOf.length; i++) {
393391
if(this._run(data, rule.oneOf[i], result))
394392
break;
395393
}

0 commit comments

Comments
 (0)