Skip to content

Commit 34f6026

Browse files
committedJan 11, 2024
types(fileURLToPath): accept url as input
1 parent b853ca4 commit 34f6026

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { fileURLToPath as _fileURLToPath } from "node:url";
22
import { promises as fsp } from "node:fs";
33
import { normalizeSlash, BUILTIN_MODULES } from "./_utils";
44

5-
export function fileURLToPath(id: string): string {
5+
export function fileURLToPath(id: string | URL): string {
66
if (typeof id === "string" && !id.startsWith("file://")) {
77
return normalizeSlash(id);
88
}

0 commit comments

Comments
 (0)
Please sign in to comment.