diff options
author | 2023-01-29 00:10:24 -0800 | |
---|---|---|
committer | 2023-01-29 00:10:46 -0800 | |
commit | 75181ea1f3fa6361c46c7e2d2b81e630021958ae (patch) | |
tree | c2eb78b67630121186dba7a76e0ce178a3fa6196 /src/options.zig | |
parent | d9c1a18776a9e692083b590a5d04b30efd9a4c03 (diff) | |
download | bun-75181ea1f3fa6361c46c7e2d2b81e630021958ae.tar.gz bun-75181ea1f3fa6361c46c7e2d2b81e630021958ae.tar.zst bun-75181ea1f3fa6361c46c7e2d2b81e630021958ae.zip |
Add helper
Diffstat (limited to '')
-rw-r--r-- | src/options.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/options.zig b/src/options.zig index e161e9582..863e12e14 100644 --- a/src/options.zig +++ b/src/options.zig @@ -636,6 +636,13 @@ pub const Loader = enum(u4) { wasm, napi, + pub fn canBeRunByBun(this: Loader) bool { + return switch (this) { + .jsx, .js, .ts, .tsx, .json, .wasm => true, + else => false, + }; + } + pub const Map = std.EnumArray(Loader, string); pub const stdin_name: Map = brk: { var map = Map.initFill(""); |