Initial URL string or URL object.
Optionalbase: string | URLOptional base URL for resolving relative URLs.
Full URL string.
Protocol with trailing colon (e.g. "https:").
Hostname (lowercased, IPv6 without brackets).
Host (hostname + :port).
Port string (empty for default port).
Pathname component.
Search string with leading "?".
Hash fragment with leading "#".
Read-only origin string.
Live URLSearchParams (cloned from internal state).
Parsed query as a plain object.
StaticfromCreate a URLBuilder from a URL string or object (convenience factory).
Optionalbase: string | URLStatichttpsCreate a URLBuilder for https://host/path.
Optionalpath: stringStatichttpCreate a URLBuilder for http://host/path.
Optionalpath: stringFill :param placeholders in pathname and add query params.
Ensure the pathname ends with a slash.
Remove trailing slash from pathname (unless it is just "/").
Append a query parameter (allows repeated keys).
Merge a query input object (null values delete keys).
Sort query params alphabetically (useful for cache key stability).
Redact sensitive query params (replace value with "REDACTED").
Remove the hash fragment.
Serialize to a URL string.
Clone as a native URL object.
Immutable URL builder with a fluent API. Every method returns a new instance.