Closed
Description
$ node
> url = require('url')
{ parse: [Function: urlParse],
resolve: [Function: urlResolve],
resolveObject: [Function: urlResolveObject],
format: [Function: urlFormat],
Url: [Function: Url] }
> var a = url.parse('http://xxx');
undefined
> a
Url {
protocol: 'http:',
slashes: true,
auth: null,
host: 'xxx',
port: null,
hostname: 'xxx',
hash: null,
search: null,
query: null,
pathname: '/',
path: '/',
href: 'http://xxx/' }
> a.toString()
'[object Object]'
Outrageous!
Why isn't url.toString() defined the straight way?
$ node -v
v6.3.1