Open prabashn opened 5 years ago
This module was conceived to be compatible with the legacy Node.js URL parser: https://nodejs.org/api/url.html#url_legacy_urlobject.
> url.parse('http://example.com/?foo=bar', true)
Url {
protocol: 'http:',
slashes: true,
auth: null,
host: 'example.com',
port: null,
hostname: 'example.com',
hash: null,
search: '?foo=bar',
query: { foo: 'bar' },
pathname: '/',
path: '/?foo=bar',
href: 'http://example.com/?foo=bar' }
an alias here would make a lot of sense. it's a module that can be used in the front end.
Per Mozilla docs, searchParams should contain the parsed query params. https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams.
But url-parse does not support this.