The library has url parse and stringify function.
⚠️ ⚠️ ⚠️ it is lameduck, because of that no query object no protocol no authentication.
but it is nano-scaled.
- parse function
- stringify function
- more test
yarn add lame-url
const url = parse( "https://www.example.com/foo/bar?_sort=asc" );
console.log(url);
{
port: null,
resource: "www.example.com",
pathname: "foo/bar",
hash: "",
search: "_sort=asc",
href: "https://www.example.com/foo/bar?_sort=asc",
query: "_sort=asc"
}