requireBaseURL()function
requireBaseURL(value: PossibleURL, caller: AnyCaller): BaseURL
| Param | Type | |
|---|---|---|
value | PossibleURL | URL string, URL object, or path to normalise. required |
caller | AnyCaller | Function to attribute a thrown error to. required |
| Throws | |
|---|---|
unknown | RequiredError If value cannot be resolved to a true URL. |
Require a Base URL — a true URL whose pathname is normalised to end in a trailing slash.
Examples
requireBaseURL("http://x.com/a", requireBaseURL); // `http://x.com/a/`