Skip to main content
URL.prototype.toString - url - Node documentation
method URL.prototype.toString

Usage in Deno

import { URL } from "node:url";
URL.prototype.toString(): string

The toString() method on the URL object returns the serialized URL. The value returned is equivalent to that of href and toJSON.

Return Type

string