fromFileUrl

import { fromFileUrl } from "jsr:@ende/path/posix/from-file-url";

function

function fromFileUrl(url: URL | string): string

Converts a file URL to a path string.

url: URL | string

The file URL to convert.

Returns

The path string.

Example: Usage

import { fromFileUrl } from "@ende/path/posix/from-file-url";
import { assertEquals } from "@ende/assert";

assertEquals(fromFileUrl(new URL("file:///home/foo")), "/home/foo");

Source