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

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

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

Convert the supplied text string (s) into a valid URL (or undefined if s [relative to base] isn't a valid URL).

  • no-throw ~ function returns undefined upon any error

Parameters

s: string
optional
base: URL = [UNSUPPORTED]