1.0.6 • Published 5 years ago

whois-info v1.0.6

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

Whois-js

Whois lookup

Installation

Install via npm:

$ npm i whois-info

Usage

Domain lookup

/*
* OK
* No Match
* Not Found
* Error: Not Supported
* Error: No Data
* Error: Connect
*/
let tests = ['yanglin.me', 'nomatchdomain.com', 'notfounddomain.me', 'nic.ba', 'nic.es', 'nic.ke']
;[...tests].forEach(domain => {
  whois.lookup(domain)
    .then(data => console.log(domain, data.split(/\n/)[0]))
    .catch(e => console.log(domain, e.message))
})

IP lookup

let ip = '8.8.8.8'
whois.lookup(ip)
  .then(data => console.log(data))
  .catch(e => console.log(ip, e.message))

Authors

Yanglin (i@yangl.in)

License

Copyright (c) 2018 Yanglin

Released under the MIT license

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago