Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

§Classes

$URL

§Functions

cleanDoubleSlashes
createURL
decode

Decode text using decodeURIComponent. Returns the original text if it fails.

decodePath

Decode path section of URL (consistent with encodePath for slash encoding).

decodeQueryKey

Decode query key (consistent with encodeQueryKey for plus encoding). Created different method for decoding key to avoid future changes on value encode/decode.

decodeQueryValue

Decode query value (consistent with encodeQueryValue for plus encoding).

encode

Encode characters that need to be encoded on the path, search and hash sections of the URL.

encodeHash

Encode characters that need to be encoded on the hash section of the URL.

encodeHost
encodeParam

Encode characters that need to be encoded on the path section of the URL as a param. This function encodes everything encodePath does plus the slash (/) character.

encodePath

Encode characters that need to be encoded on the path section of the URL.

encodeQueryItem
encodeQueryKey

Like encodeQueryValue but also encodes the = character.

encodeQueryValue

Encode characters that need to be encoded query values on the query section of the URL.

getQuery
hasLeadingSlash
hasProtocol deprecated
hasTrailingSlash
isEmptyURL
isEqual
isNonEmptyURL
isRelative
isSamePath
isScriptProtocol
joinURL
normalizeURL
parseAuth

It takes a string of the form username:password and returns an object with the username and password decoded

parseFilename
parseHost

It takes a string, and returns an object with two properties: hostname and port

parsePath

It splits the input string into three parts, and returns an object with those three parts

parseQuery
parseURL

It takes a URL string and returns an object with the URL's protocol, auth, host, pathname, search, and hash

resolveURL
stringifyParsedURL

It takes a ParsedURL object and returns the stringified URL

stringifyQuery
withBase
withHttp
withHttps
withLeadingSlash
withoutBase
withoutLeadingSlash
withoutProtocol
withoutTrailingSlash
withProtocol
withQuery
withTrailingSlash

§Interfaces

HasProtocolOptions
ParsedAuth
ParsedHost
ParsedURL

§Type Aliases

ParsedQuery
QueryObject
QueryValue