node-tldtools
node-tldtools copied to clipboard
The tld is not been parsed correctly
Code:
var tldtools = require('tldtools').init();
console.log(tldtools.extract('http://bob:[email protected]:1234/?go=abc&123'));
Result:
{ subdomain: 'wagga.wagga.funkjazz.gov',
domain: 'au',
tld: '',
url_tokens:
{ protocol: 'http:',
slashes: true,
auth: 'bob:funk',
host: 'wagga.wagga.funkjazz.gov.au:1234',
port: '1234',
hostname: 'wagga.wagga.funkjazz.gov.au',
hash: null,
search: '?go=abc&123',
query: 'go=abc&123',
pathname: '/',
path: '/?go=abc&123',
href: 'http://bob:[email protected]:1234/?go=abc&123' },
inspect: { useful: [Function], getDomain: [Function] } }
TLD Cache is UP
Expected result:
{ subdomain: 'wagga.wagga',
domain: 'funkjazz',
tld: 'gov.au',
url_tokens:
{ protocol: 'http:',
slashes: true,
auth: 'bob:funk',
host: 'bob:[email protected]:1234',
port: '1234',
hostname: 'wagga.wagga.funkjazz.gov.au',
href: 'http://bob:[email protected]:1234/?go=abc&123',
search: '?go=abc&123',
query: 'go=abc&123',
pathname: '/' },
inspect: { useful: [Function], getDomain: [Function] } }
tldtools version : "0.0.19"
nodejs version: v0.10.25
Also have this problem?