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

Commit 0a8b3b8

Browse files
Further simplify object normalization
1 parent 22008b8 commit 0a8b3b8

File tree

1 file changed

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

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ export default class Compiler {
4444
} else {
4545
for (const [key, val] of Object.entries(args)) {
4646
if (Array.isArray(val)) {
47-
for (let i = 0; i < val.length; i++) {
48-
this.commandArguments.push(
49-
this.formatArgument(key, val[i]));
50-
}
47+
this.commandArguments.push(...val.map((item) => this.formatArgument(key, item)));
5148
} else {
52-
this.commandArguments.push(
53-
this.formatArgument(key, val));
49+
this.commandArguments.push(this.formatArgument(key, val));
5450
}
5551
}
5652
}

0 commit comments

Comments
 (0)