deno.com
property URL.protocol

The protocol property of the URL interface is a string that represents the protocol scheme of the URL and includes a trailing :.

Examples #

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

Type #

string

See #