Build an absolute URL from a base URL and a relative URL (RFC 1808).
Full Changelog: https://github.com/tjenkinson/url-toolkit/compare/v2.2.4...v2.2.5
Full Changelog: https://github.com/tjenkinson/url-toolkit/compare/v2.2.3...v2.2.4
This release contains no functional changes.
URL()
(thanks @JamieSlome for flagging this)URL()
The JS URL() function also lets you calculate a new URL from a base and relative one.
That uses the URL Living Standard which is slightly different to RFC 1808 that this library implements.
One of the key differences is that the URL Living Standard has the concept of a 'special url' and 'special scheme'. For these special URL's, such as a URL with the http
scheme, they normalise them in a way that results in http:///example.com/something
becoming http://example.com/something
. This library does not do that and parseURL()
would give you //
as the netLoc
and /example.com
as the path.
Optimize regex to increase performance (https://github.com/tjenkinson/url-toolkit/pull/26)
;
is now allowed in fragments (https://github.com/tjenkinson/url-toolkit/pull/13)
Previously http://a.com/expiretime=111;dirmatch=true/master.m3u8
+ ./a:b
would not be handled correctly.
this
(https://github.com/tjenkinson/url-toolkit/pull/12)