mergeMetaURL()function

mergeMetaURL(base: ImmutableURL | undefined, current: ImmutableURL | undefined, next: PossibleURL | undefined, params: PossibleURIParams | undefined, caller: AnyCaller = mergeMetaURL): ImmutableURL | undefined
ParamType
baseImmutableURL
Base URL to resolve next against.
    .hrefURLString
A URL string has a protocol and a //. required readonly
    .originURLString
A URL string has a protocol and a //. required readonly
    .pathnameAbsolutePath
Absolute path string starting with a / slash. required readonly
currentImmutableURL
The current URL, used when next is unset.
    .hrefURLString
A URL string has a protocol and a //. required readonly
    .originURLString
A URL string has a protocol and a //. required readonly
    .pathnameAbsolutePath
Absolute path string starting with a / slash. required readonly
nextPossibleURL
The new (possibly relative) URL to resolve.
paramsPossibleURIParams
URI params to set on the resolved URL (replaces existing params).
callerAnyCaller
Function to attribute thrown URL-resolution errors to (defaults to mergeMetaURL). Defaults to mergeMetaURL
Return
ImmutableURL | undefined
The resolved URL, or undefined if neither next nor current was set.

Merge a new metadata URL onto the current one, resolving it and applying params.

  • New URL is resolved relative to the base URL, falling back to current when unset.