diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e428887..f46b0eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [8.x, 10.x, 12.x] + node-version: [10.x, 12.x] steps: - uses: actions/checkout@v1 diff --git a/README.md b/README.md index 49adbd7..c91a332 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ Aiming to have these features: - [x] query whois for IPs and return parsed result -> `whoiser.ip()` - [x] query whois for ASN with parsed result -> `whoiser.asn()` - [x] Punycode support -- [ ] Normalize Domain whois field names, removing inconsistencies between whois servers -- [ ] Test more IPs and ASNs to deliver consistent whois results +- [ ] Normalize Domain WHOIS field names, removing inconsistencies between WHOIS servers +- [ ] Test more IPs and ASNs to deliver consistent WHOIS results ## Getting Started @@ -64,7 +64,7 @@ Returns a promise which resolves with an `Object` of WHOIS servers checked: "Domain Name": "google.com", "Registrar WHOIS Server": "whois.markmonitor.com", "Creation Date": "1997-09-15T00:00:00-0700", - "Registrar Registration Expiration Date": "2020-09-13T21:00:00-0700", + "Expiry Date": "2020-09-13T21:00:00-0700", "Registrar": "MarkMonitor, Inc.", "Domain Status": [ "clientUpdateProhibited", diff --git a/package-lock.json b/package-lock.json index 571fe5b..f24cf8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "whoiser", - "version": "1.5.0", + "version": "1.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ef80097..159e7d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whoiser", - "version": "1.5.0", + "version": "1.5.1", "description": "Whois info for TLDs, domains and IPs", "keywords": [ "whois", diff --git a/parsers.js b/parsers.js index fb248e0..65d19bf 100644 --- a/parsers.js +++ b/parsers.js @@ -116,30 +116,34 @@ const parseSimpleWhois = whois => { const parseDomainWhois = whois => { const renameLabels = { - 'domain name': 'Domain Name', - 'domain': 'Domain Name', - 'nameserver': 'Name Server', - 'nameservers': 'Name Server', - 'nserver': 'Name Server', - 'name servers': 'Name Server', - 'flags': 'Domain Status', - 'status': 'Domain Status', + 'domain name': 'Domain Name', + 'domain': 'Domain Name', + 'idn tag': 'IDN', + 'internationalized domain name': 'IDN', + 'nameserver': 'Name Server', + 'nameservers': 'Name Server', + 'nserver': 'Name Server', + 'name servers': 'Name Server', + 'flags': 'Domain Status', + 'status': 'Domain Status', 'sponsoring registrar iana id': 'Registrar IANA ID', - 'registrar': 'Registrar', - 'creation date': 'Created Date', - 'registered on': 'Created Date', - 'created': 'Created Date', - 'registration time': 'Created Date', - 'registered on': 'Created Date', - 'last updated': 'Updated Date', - 'changed': 'Updated Date', + 'registrar': 'Registrar', + 'creation date': 'Created Date', + 'registered on': 'Created Date', + 'created': 'Created Date', + 'registration time': 'Created Date', + 'registered on': 'Created Date', + 'last updated': 'Updated Date', + 'changed': 'Updated Date', 'registrar registration expiration date': 'Expiry Date', - 'registry expiry date': 'Expiry date', - 'expires on': 'Expiry Date', - 'expiration time': 'Expiry Date', - 'expire date': 'Expiry Date', - 'paid-till': 'Expiry Date', - 'expiry date': 'Expiry Date' + 'registry expiry date': 'Expiry Date', + 'expires on': 'Expiry Date', + 'expiration time': 'Expiry Date', + 'expire date': 'Expiry Date', + 'paid-till': 'Expiry Date', + 'expiry date': 'Expiry Date', + 'registrant': 'Registrant Name', + 'Registrant Contact Email': 'Registrant Email' } const ignoreLabels = ['note', 'notes', 'please note', 'important', 'notice', 'terms of use', 'web-based whois', 'https', 'to', 'registration service provider'] const ignoreTexts = [ diff --git a/test/test.js b/test/test.js index 6ff8f5b..b258172 100644 --- a/test/test.js +++ b/test/test.js @@ -13,6 +13,10 @@ describe('Whoiser', function() { let whois = await whoiser('google.com') assert.equal(whois['whois.verisign-grs.com']['Domain Name'], 'GOOGLE.COM', 'Domain name doesn\'t match') assert.equal(whois['whois.verisign-grs.com']['Registry Domain ID'], '2138514_DOMAIN_COM-VRSN', 'Registry Domain ID doesn\'t match') + + for (const whoisServer in whois) { + assert(Object.keys(whois[whoisServer]).includes('Expiry Date'), 'Whois result doesn\'t have "Expiry Date"') + } }); it('should return IP WHOIS for "1.1.1.1"', async function() {