Open
Description
I noticed that origin
defaults to "null"
unlike any of the other default values that the parser returns and was wondering if that is intentional. Here's what I get when passing an empty string to the parser:
{
protocol: '',
slashes: false,
hash: '',
query: '',
pathname: '',
auth: '',
host: '',
port: '',
hostname: '',
password: '',
username: '',
origin: 'null',
href: ''
}
Besides the inconsistency, "null"
evaluates truthily, which seems potentially problematic to url-parse users.
If an empty string is ultimately desired for origin
when no value is present, I can submit a PR for that.
Metadata
Metadata
Assignees
Labels
No labels