aboutsummaryrefslogtreecommitdiff
path: root/src/node_fallbacks.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/node_fallbacks.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node_fallbacks.zig b/src/node_fallbacks.zig
index 561b2b8cf..fa51ef7df 100644
--- a/src/node_fallbacks.zig
+++ b/src/node_fallbacks.zig
@@ -499,3 +499,11 @@ pub fn contentsFromPath(path: string) ?string {
}
pub const buffer_fallback_import_name: string = "node:buffer";
+
+pub fn isDisabledFallback(name: string) bool {
+ if (name.len >= 2) {
+ return (strings.eqlComptime(name, "fs") or strings.eqlComptime(name[0..3], "fs/")) or (name.len >= "module".len and strings.eqlComptime(name, "module"));
+ }
+
+ return false;
+}