deno.land / std@0.224.0 / path / _common / from_file_url.ts

from_file_url.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
export function assertArg(url: URL | string) { url = url instanceof URL ? url : new URL(url); if (url.protocol !== "file:") { throw new TypeError("Must be a file URL."); } return url;}
std

Version Info

Tagged at
6 months ago