Readonly
dirWhether this is a route to directory.
Readonly
pathA path split onto URL entries.
Readonly
urlURL this route represents, except for the pathname.
Intended to be immutable.
Extracts a section of this route between the given entry indices.
When segment starts from the beginning of the route (i.e. from === 0
), its URL retains protocol, host, port,
user, and password. Otherwise segment's URL path becomes relative to route:/
one.
When segment ends at the last path entry (i.e. to
is absent or equal to path length), its URL retains search
parameters. Otherwise they are removed.
Zero-based index at which to start extraction. A negative index is treated as zero.
Optional
toEntry: numberZero-based index before which to end extraction. An absent value or the value greater than the
path length is treated as equal to path length. If this value is less than from
, an empty route is returned.
Either a route section, or this route if section has the same length.
Generated using TypeDoc
A route representing an URL.