{ } qjs-modules

url

Source: lib/url.js (pure JS)

WHATWG URL / URLSearchParams implementation.

Exports

ExportKindDescription
URLclassParsed URL with href, protocol, host, hostname, port, pathname, search, searchParams, hash, etc.
URLSearchParamsclassQuery-string map: get, getAll, set, append, delete, has, entries, toString, iteration.

fileURLToPath / pathToFileURL

fileURLToPath(url) (string or URL; TypeError with code ERR_INVALID_URL_SCHEME, ERR_INVALID_FILE_URL_HOST, ERR_INVALID_FILE_URL_PATH) and pathToFileURL(path) (resolved against the cwd, percent-encoded as Node does). The legacy url.parse(), format(), resolve() are not provided.

Export list

Generated by utilities/doc-api.js from the url dump of utilities/api-surface.sh: 39 members. Edit the text above this block, not the block.

Functions: fileURLToPath(), pathToFileURL()

URL

class, constructible

  • static methods: canParse(), parse()
  • methods: toString()
  • properties: auth (get), hash (get/set), host (get/set), hostname, href (get/set), origin (get), path (get), pathname, port, protocol, search (get/set), searchParams

URLSearchParams

class, constructible

  • methods: append(), delete(), entries(), forEach(), get(), getAll(), has(), keys(), set(), sort(), toString(), values()
  • properties: size (get)

default

object

  • static methods: URL(), URLSearchParams(), fileURLToPath(), pathToFileURL()