Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 22008b8

Browse files
Use modern object iteration
1 parent ad4aeb0 commit 22008b8

File tree

1 file changed

+5
-5
lines changed
  • packages/google-closure-compiler/lib/node

1 file changed

+5
-5
lines changed

packages/google-closure-compiler/lib/node/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ export default class Compiler {
4242
if (Array.isArray(args)) {
4343
this.commandArguments.push(...args);
4444
} else {
45-
for (let key in args) {
46-
if (Array.isArray(args[key])) {
47-
for (let i = 0; i < args[key].length; i++) {
45+
for (const [key, val] of Object.entries(args)) {
46+
if (Array.isArray(val)) {
47+
for (let i = 0; i < val.length; i++) {
4848
this.commandArguments.push(
49-
this.formatArgument(key, args[key][i]));
49+
this.formatArgument(key, val[i]));
5050
}
5151
} else {
5252
this.commandArguments.push(
53-
this.formatArgument(key, args[key]));
53+
this.formatArgument(key, val));
5454
}
5555
}
5656
}

0 commit comments

Comments
 (0)