mergeMetaURL()function
mergeMetaURL(base: ImmutableURL | undefined, current: ImmutableURL | undefined, next: PossibleURL | undefined, params: PossibleURIParams | undefined, caller: AnyCaller = mergeMetaURL): ImmutableURL | undefined
| Param | Type | |
|---|---|---|
base | ImmutableURL | Base URL to resolve next against. |
.href | URLString | A URL string has a protocol and a //. required readonly |
.origin | URLString | A URL string has a protocol and a //. required readonly |
.pathname | AbsolutePath | Absolute path string starting with a / slash. required readonly |
current | ImmutableURL | The current URL, used when next is unset. |
.href | URLString | A URL string has a protocol and a //. required readonly |
.origin | URLString | A URL string has a protocol and a //. required readonly |
.pathname | AbsolutePath | Absolute path string starting with a / slash. required readonly |
next | PossibleURL | The new (possibly relative) URL to resolve. |
params | PossibleURIParams | URI params to set on the resolved URL (replaces existing params). |
caller | AnyCaller | 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
baseURL, falling back tocurrentwhen unset.