UNPKG

diggy

Version:

Multi-backend DNS resolver for Node.js/Browser — supports dig, DNS over HTTPS, and native Node.js DNS.

21 lines (20 loc) 774 B
import { type AnyDNSRecord } from "../types"; type InputData = string | string[]; /** * Converts input data to a DNS record format. * This function takes a name, type, optional TTL, and data, * and returns an object representing a DNS record. * * @param name - The name of the DNS record, e.g., "example.com". * @param type - The type of DNS record, e.g., "A", "AAAA", "MX", etc. * @param ttl - The time-to-live (TTL) for the DNS record, in seconds. Defaults to 0 if not provided. * @param data - The data associated with the DNS record, which can vary based on the type. * @group Utilities */ export declare function toDnsRecord({ name, type, ttl, data, }: { name: string; type: string; ttl?: number; data: InputData; }): AnyDNSRecord; export {};