aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/zig.ts
diff options
context:
space:
mode:
authorOfek <ofekshilon@gmail.com>2024-01-13 18:35:11 +0200
committerGitHub <noreply@github.com>2024-01-13 18:35:11 +0200
commit21fe5523c0594ea79846e57b6c98f0761f76b30f (patch)
tree1c7f0988352bb13b6513378ba9952ee0219d45b6 /lib/compilers/zig.ts
parentf3277b8aed2ca12ce961d08ef792c4061a3331ac (diff)
downloadcompiler-explorer-21fe5523c0594ea79846e57b6c98f0761f76b30f.tar.gz
compiler-explorer-21fe5523c0594ea79846e57b6c98f0761f76b30f.zip
Since ES6 there's no reason to use `underscore`s map and filter (#5989)gh-10149
Mindless replacements of the form `_.filter(options, option =>...` --> `options.filter(option =>...`. One not *entirely* mindless replacement at the bottom of compiler-dropin-tool.ts : ``` - return _.filter(pathFilteredFlags) as string[]; + return pathFilteredFlags.filter(Boolean) as string[]; ``` 6 files can now stop importing underscore.
Diffstat (limited to 'lib/compilers/zig.ts')
-rw-r--r--lib/compilers/zig.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compilers/zig.ts b/lib/compilers/zig.ts
index b0d55432b..e01808e57 100644
--- a/lib/compilers/zig.ts
+++ b/lib/compilers/zig.ts
@@ -175,7 +175,7 @@ export class ZigCompiler extends BaseCompiler {
override filterUserOptions(userOptions: string[]): string[] {
const forbiddenOptions = /^(((--(cache-dir|name|output|verbose))|(-(mllvm|f(no-)?emit-))).*)$/;
- return _.filter(userOptions, option => !forbiddenOptions.test(option));
+ return userOptions.filter(option => !forbiddenOptions.test(option));
}
override isCfgCompiler(/*compilerVersion*/): boolean {