Skip to content

Commit 3361aac

Browse files
committed
Prefer forEach over for of so it doesn't require Symbol once transpiled
1 parent f794ca4 commit 3361aac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

assert.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,18 +303,19 @@ assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
303303

304304
class Comparison {
305305
constructor(obj, keys, actual) {
306-
for (const key of keys) {
306+
keys.forEach(key => {
307307
if (key in obj) {
308308
if (actual !== undefined &&
309-
typeof actual[key] === 'string' &&
310-
isRegExp(obj[key]) &&
311-
obj[key].test(actual[key])) {
309+
typeof actual[key] === 'string' &&
310+
isRegExp(obj[key]) &&
311+
obj[key].test(actual[key])
312+
) {
312313
this[key] = actual[key];
313314
} else {
314315
this[key] = obj[key];
315316
}
316317
}
317-
}
318+
});
318319
}
319320
}
320321

0 commit comments

Comments
 (0)