whois-info

    1.0.6 • Public • Published

    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

    Install

    npm i whois-info

    DownloadsWeekly Downloads

    12

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    102 kB

    Total Files

    6

    Last publish

    Collaborators

    • jslang