Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/node/dns.ts>lookup

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function lookup
import { lookup } from "https://deno.land/std@0.145.0/node/dns.ts";

Parameters

hostname: string
family: number
callback: (
err: ErrnoException | null,
address: string,
family: number,
) => void

Returns

GetAddrInfoReqWrap | Record<string, never>

Parameters

hostname: string
callback: (
err: ErrnoException | null,
address: string,
family: number,
) => void

Returns

GetAddrInfoReqWrap | Record<string, never>

Parameters

hostname: string
callback: (err: ErrnoException | null, addresses: LookupAddress[]) => void

Returns

GetAddrInfoReqWrap | Record<string, never>

Parameters

hostname: string
options: LookupOptions
callback: (
err: ErrnoException | null,
address: string | LookupAddress[],
family: number,
) => void

Returns

GetAddrInfoReqWrap | Record<string, never>

Parameters

hostname: string
callback: (
err: ErrnoException | null,
address: string,
family: number,
) => void

Returns

GetAddrInfoReqWrap | Record<string, never>

Parameters

hostname: string
options: unknown
optional
callback: unknown

Returns

GetAddrInfoReqWrap | Record<string, never>