Skip to main content
Module

std/node/url.ts>format

Deno standard library
Go to Latest
function format
import { format } from "https://deno.land/std@0.119.0/node/url.ts";

The URL object has both a toString() method and href property that return string serializations of the URL. These are not, however, customizable in any way. This method allows for basic customization of the output.

Parameters

urlObject: URL
optional
options: { auth: boolean; fragment: boolean; search: boolean; unicode: boolean; }

Returns

string

a customizable serialization of a URL String representation of a WHATWG URL object.