Interface WhoIsOptions

WhoIs options

Hierarchy

  • WhoIsOptions

Properties

encoding?: null | string

The encoding type used for WhoIs server and response. By default UTF-8 is used.

parseData?: null | Object

Which data needs to be extracted/parsed from the WhoIs response. An object can be passed which contains keys of the fields of the WhoIs response. A copy of the provided object will be returned with the values filled for the provided keys.

The keys can have default value of empty string. However, if the WhoIs response has multiple values for the same field (eg: 'Domain Status'), then all the values can be collected by providing a default value of an Array([]).

Following example shows an object used to collect 'Domain Name', 'Domain Status' (multiple values) and 'Registrar' from WhoIs response

Example

{'Domain Name': '', 'Domain Status': [], 'Registrar': ''}
proxy?: null | ProxyData
server?: null | string

The WhoIs server to collect data from. If not provided, the server will automatically determined using the tld

serverPort?: null | number

The port of the WhoIs server. By default, port 43 is used.

tld?: null | string

TLD of the domain. If the tld is not provided (or null), then it will be automatically determined as to the given domain name

Generated using TypeDoc