I would like to take a string
var a = "http://example.com/aa/bb/"
and process it into an object such that
a.hostname == "example.com"
and
a.pathname == "/aa/bb"
I would like to take a string
var a = "http://example.com/aa/bb/"
and process it into an object such that
a.hostname == "example.com"
and
a.pathname == "/aa/bb"
Why do not use it?
Use https://www.npmjs.com/package/uri-parse-lib for this