Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jolle/whis
🕵️ A NodeJS WHOIS client
https://github.com/jolle/whis
nodejs typescript whois
Last synced: 10 days ago
JSON representation
🕵️ A NodeJS WHOIS client
- Host: GitHub
- URL: https://github.com/jolle/whis
- Owner: jolle
- License: mit
- Created: 2018-09-04T06:56:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-01T19:08:16.000Z (almost 2 years ago)
- Last Synced: 2024-12-08T01:33:17.197Z (20 days ago)
- Topics: nodejs, typescript, whois
- Language: TypeScript
- Homepage:
- Size: 116 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# whis
A very simple and minimal WHOIS library. WHOIS server is got from [whis-data](https://yarnpkg.com/en/package/whis-data) which updates every month (from IANA). Please report issues like missing or incorrect WHOIS server data to the [whis-data repository](https://github.com/jolle/whis-data).
## Usage
```sh
$ yarn add whis
```(or `npm install whis`)
### `whis(domain: string, server?: string) ⇒ Promise`
### `getRaw(domain: string, server?: string) ⇒ Promise`
### JavaScript (NodeJS)
```js
const { whis } = require('whis');whis('jolle.io').then(data => console.log(data));
``````js
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.
```ts
import whis from 'whis';whis('jolle.io').then(data => console.log(data));
``````ts
import { getRaw } from 'whis';getRaw('jolle.io').then(data => console.log(data)); // this will print the raw WHOIS response
```### Advanced usage
```ts
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`.
```