Skip to content

v2.2.3

Choose a tag to compare

@tjenkinson tjenkinson released this 10 Jul 10:39

This release contains no functional changes.

  • Add security disclosure policy
  • document differences to JS URL() (thanks @JamieSlome for flagging this)

Differences to JS 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.