Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dxx/src/lib/$shared.ts>intoURL

🚀 (Deno) enhanced executor
Latest
function intoURL
import { intoURL } from "https://deno.land/x/dxx@rf/src/lib/$shared.ts";

Convert a path string into a standard URL object, relative to an optional base reference URL.

  • no-throw ~ function returns undefined upon any error

Parameters

optional
path: string

• path/URL-string (may already be in URL file format [ie, 'file://...'])

optional
base: URL

• baseline URL reference point ~ defaults to $path.toFileUrl(Deno.cwd()+$path.SEP); note: per usual relative URL rules, if base does not have a trailing separator, determination of path is relative the the parent of base

optional
options: IntoUrlOptions

~ defaults to {driveLetterSchemes: true}

Returns

URL | undefined

Parameters

path: string

Returns

URL | undefined