Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/node/url.ts

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.177.0/node/url.ts";

Functions

The url.domainToASCII() takes an arbitrary domain and attempts to convert it into an IDN

The url.domainToUnicode() takes an IDN and attempts to convert it into unicode

This function ensures the correct decodings of percent-encoded characters as well as ensuring a cross-platform valid absolute path string.

The url.urlParse() method takes a URL string, parses it, and returns a URL object.

This function ensures that filepath is resolved absolutely, and that the URL control characters are correctly encoded when converting into a File URL.

The url.resolve() method resolves a target URL relative to a base URL in a manner similar to that of a Web browser resolving an anchor tag HREF.

This utility function converts a URL object into an ordinary options object as expected by the http.request() and https.request() APIs.