diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-07-25 19:08:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 19:08:14 -0400 |
commit | 3bf147fe287ac779b20d318daba56b336f356adf (patch) | |
tree | 3b5bfe2a1ad918b275a2cd08f7dcc05f90a180ab /ext/node/polyfill.rs | |
parent | 0cf7f268a7df7711ac6ab8c2c67b4d7abf454fcd (diff) |
refactor: decouple node resolution from deno_core (#24724)
Diffstat (limited to 'ext/node/polyfill.rs')
-rw-r--r-- | ext/node/polyfill.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/ext/node/polyfill.rs b/ext/node/polyfill.rs index 5847acc42..b4030a491 100644 --- a/ext/node/polyfill.rs +++ b/ext/node/polyfill.rs @@ -1,7 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use deno_core::ModuleSpecifier; - /// e.g. `is_builtin_node_module("assert")` pub fn is_builtin_node_module(module_name: &str) -> bool { SUPPORTED_BUILTIN_NODE_MODULES @@ -9,18 +7,6 @@ pub fn is_builtin_node_module(module_name: &str) -> bool { .any(|m| *m == module_name) } -/// Ex. returns `fs` for `node:fs` -pub fn get_module_name_from_builtin_node_module_specifier( - specifier: &ModuleSpecifier, -) -> Option<&str> { - if specifier.scheme() != "node" { - return None; - } - - let (_, specifier) = specifier.as_str().split_once(':')?; - Some(specifier) -} - macro_rules! generate_builtin_node_module_lists { ($( $module_name:literal ,)+) => { pub static SUPPORTED_BUILTIN_NODE_MODULES: &[&str] = &[ |