diff options
author | Ryan Clements <ryanclementshax@gmail.com> | 2023-06-16 06:43:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 19:43:59 +0900 |
commit | d32287d2111ec7b845e09c7cfe6a5d779c5f3bd1 (patch) | |
tree | 20341750a687b05458a5cae8a634fb3ac79888f9 /ext/node/polyfills/path/_posix.ts | |
parent | 239dc5e681ad61fb77ed7e0791a8512d6842040b (diff) |
fix(ext/node): remove fromFileUrl from "node:path" (#19504)
Diffstat (limited to 'ext/node/polyfills/path/_posix.ts')
-rw-r--r-- | ext/node/polyfills/path/_posix.ts | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/ext/node/polyfills/path/_posix.ts b/ext/node/polyfills/path/_posix.ts index 3f42bbe86..7190795a3 100644 --- a/ext/node/polyfills/path/_posix.ts +++ b/ext/node/polyfills/path/_posix.ts @@ -478,24 +478,6 @@ export function parse(path: string): ParsedPath { } /** - * Converts a file URL to a path string. - * - * ```ts - * fromFileUrl("file:///home/foo"); // "/home/foo" - * ``` - * @param url of a file URL - */ -export function fromFileUrl(url: string | URL): string { - url = url instanceof URL ? url : new URL(url); - if (url.protocol != "file:") { - throw new TypeError("Must be a file URL."); - } - return decodeURIComponent( - url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), - ); -} - -/** * Converts a path string to a file URL. * * ```ts @@ -513,14 +495,12 @@ export function toFileUrl(path: string): URL { ); return url; } - export default { basename, delimiter, dirname, extname, format, - fromFileUrl, isAbsolute, join, normalize, |