2.2.0 • Published 1 year ago

whis v2.2.0

Weekly downloads
5
License
MIT
Repository
github
Last release
1 year ago

whis

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.

Usage

$ yarn add whis

(or npm install whis)

whis(domain: string, server?: string) ⇒ Promise<WhoisData>

getRaw(domain: string, server?: string) ⇒ Promise<string>

JavaScript (NodeJS)

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 (and ES6+)

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

Advanced usage

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`.
2.2.0

1 year ago

2.1.0

1 year ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago