Ls in Node.js before, via the <code>url</code> module, but this provided a very Node.js specific implementation which is now considered legacy.</p>

<p>The <code>url</code> module now provides an additional implementation which implements the standardized WHATWG URL API, making the url-parsing code of Node.js work identical to the way that web browsers are parsing URLs.</p>

<p>The new API is based on the <code>URL</code> object, which makes the different parts of a URL available as object attributes:</p>

