dreamworkAPI
Ctrl K
GitHub
typeDocs / URL / State

URL.State

typesharedmenusource

The parsed parts of a URL, as returned by URL.parse and kept in url.state.

Unlike the URL fields, the values are not serialized: the host can be an IPv4 integer or an IPv6 object and the path is a list of segments.

Fields

NameTypeDescription
scheme?string?The lowercase scheme without the ":", e.g. "https".
username?string?The percent-encoded username.
password?string?The percent-encoded password.
hostnamestring | IPv4 | IPv6 | nilThe host: an ASCII domain or opaque host string, an IPv4 address, an IPv6 address or nil if the URL has no host.
port?integer?The port, nil when it is not given or is the default port of the scheme.
pathstring | string[] | nilThe percent-encoded path segments, or a string for opaque paths (mailto:, data:).
fragment?string?The percent-encoded fragment without the "#".
query?string?The percent-encoded query without the "?".
Generated from the dreamwork meta branch.