Helpers for JavaScript module specifier strings.
Summary
Functions
Return whether a specifier names a Node.js built-in module, including a
subpath of one such as timers/promises or node:fs/promises.
Return whether a specifier names a helper from @oxc-project/runtime.
Splits a JavaScript module specifier into its path-like part and query string.
Functions
Return whether a specifier names a Node.js built-in module, including a
subpath of one such as timers/promises or node:fs/promises.
Return whether a specifier names a helper from @oxc-project/runtime.
OXC's transform imports these when it lowers syntax for a target, such as
class fields below ES2022. OXC.bundle/2 provides them itself, so they are
never resolved from node_modules.
Splits a JavaScript module specifier into its path-like part and query string.
Unlike URL parsing, this preserves package import specifiers such as
#client/constants, where the leading # is part of the JavaScript module
specifier rather than a URL fragment marker.