A very simple and minimal WHOIS library. WHOIS server is got from whis-data which updates every month (from IANA). Please report issues like missing or incorrect WHOIS server data to the whis-data repository.
$ yarn add whis
(or npm install whis
)
const { whis } = require('whis');
whis('jolle.io').then(data => console.log(data));
const { getRaw } = require('whis');
getRaw('jolle.io').then(data => console.log(data)); // this will print the raw WHOIS response
TypeScript typings are included automatically. You do not need to install typings manually from an external repository or with the @typings/*
packages.
import whis from 'whis';
whis('jolle.io').then(data => console.log(data));
import { getRaw } from 'whis';
getRaw('jolle.io').then(data => console.log(data)); // this will print the raw WHOIS response
import whis from 'whis';
whis('intranet-service.corporation', 'internal-whois.com').then(data =>
console.log(data)
); // this will use the WHOIS server in "internal-whois.com" to get the data about `intranet-service.corporation`.