Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

async-whois-dns

aknazu81ISC1.4.0TypeScript support: included

Async rdap, whois and dns lookup for node.js using promises. Works with AWS Lambda.

whois, digdns, serverless, rdap, digmx, lambda, digtxt, reverse ip

readme

async-whois-dns

Makes WHOIS, dig ns, low-level RDAP calls to be available in environments without bash commands (example AWS Lambda)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.whois(
  // This should be a string with basic latin letters only.
  "www.some.example.co.uk"
);

Installation

npm install async-whois-dns

Methods

🧩 rdap(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.rdap(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk" OR "192.168.1.1"
);

Takes a URL string or IP and tries to recover the whois information with RDAP. If failed try the whois

🧩 digNs(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digNs(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk"
);

Takes a URL string and tries to recover the Name Server.

🧩 digMx(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digMx(
    // This should be a string with basic latin letters only.
    "example.com"
);

Takes a URL string and tries to recover the MX Server.

🧩 digTxt(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digTxt(
    // This should be a string with basic latin letters only.
    "example.com"
);

Takes a URL string and tries to recover the TXT Server.

🧩 ipResolver(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.ipResolver(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk"
);

Takes a URL string and tries to recover the IP address associated with it.

License

MIT