deno.com
method URL.toJSON
#URL.toJSON(): string

The toJSON() method of the URL interface returns a JSON representation of the URL.

Examples #

#
const myURL = new URL('https://example.org/foo');
console.log(myURL.toJSON());   // Logs "https://example.org/foo"

Return Type #

string

See #