Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dns-resolve

DNS resolution with timeout and retry control

Installation

npm install dns-resolve

Usage

import resolve from "dns-resolve";

// resolve A resource record type by default
await resolve("example.com");

API

resolve(hostname[, rrtype, options]):

  • hostname Host name to resolve.
  • rrtype Resource record type. Default: 'A'.
  • options
    • timeout Query timeout in milliseconds, or -1 to use the default timeout.
    • tries The number of tries the resolver will try contacting each name server before giving up. Default: 4
    • servers <string[]> array of RFC 5952 formatted addresses

About

DNS resolution with timeout and retry control and custom servers.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages