summaryrefslogtreecommitdiff
path: root/ext/node/polyfill.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfill.rs')
-rw-r--r--ext/node/polyfill.rs14
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] = &[