Fresolve4
Bun

function

dns.promises.resolve4

function resolve4(
hostname: string
): Promise<string[]>;

Uses the DNS protocol to resolve IPv4 addresses (A records) for the hostname. On success, the Promise is resolved with an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106']).

@param hostname

Host name to resolve.

function resolve4(
hostname: string,
): Promise<RecordWithTtl[]>;

Uses the DNS protocol to resolve IPv4 addresses (A records) for the hostname. On success, the Promise is resolved with an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106']).

@param hostname

Host name to resolve.

function resolve4(
hostname: string,
): Promise<string[] | RecordWithTtl[]>;

Uses the DNS protocol to resolve IPv4 addresses (A records) for the hostname. On success, the Promise is resolved with an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106']).

@param hostname

Host name to resolve.