The hierarchical identifier to extract the base from
The base as a hierarchical identifier terminated by a trailing slash, or undefined if iri is not
a valid hierarchical identifier (opaque URIs, internal paths, relative references, or strings carrying an
isolated UTF-16 surrogate)
Extracts the base identifier from a hierarchical identifier.
Returns the scheme and authority components (the "origin" per RFC 6454) followed by a trailing slash, suitable for use as a base identifier in reference resolution. Path, query, and fragment components are discarded.
http://example.org/a/b?q#f): returnsscheme://authority/app:/a/b): returnsscheme:/file:///a/b): returnsscheme:///