New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

whoisjs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whoisjs

A whois client for Node

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

WhoisJS

A WHOIS module for Node.js written in CoffeeScript. WhoisJS is able to perform lookups on over 200 TLDs.

Requirements

This library has been tested with Node.JS v0.4.12 and v0.10.26

How to Install

$ npm install whoisjs

How to Use

  Whoisjs = require('whoisjs').whois

  who = new Whoisjs()
  domain = "google.fr"

  who.query domain, (response) ->
    state = "available" if response.available()
    state = "unavailable" if response.unavailable()
    state = "timeout" if response.timeout()
    state = "error" if response.error()
    state ||= "unknown"
    callback(domain, state);

How to debug

Show me the whois response already!

From the above, response.raw contains the response data from the Whois server. console.log it, and see what's happening.

The lib/whois/server/adapters files describe how the response is interpreted via the positive(), negative(), and error() functions. If you notice the responses aren't being registered correctly, please file and issue or send a pull request.

License

WhoisJS is released under the MIT license.

Credit

WhoisJS is inspired by Ruby Whois

Author

Julian Giuca.

Please feel free to contact me with any questions, tips, or suggestions.

Keywords

dns

FAQs

Package last updated on 15 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts