Function signature
DnsRecord object. This function converts tab-separated DNS record format into a typed JavaScript object.
Parameters
DNS record string in tab-separated format, or a For example:
Uint8Array containing the encoded string.Expected format:Returns
A structured
DnsRecord object with the following fields:Fully qualified domain name (e.g.,
example.com, mail.google.com, analytics.x.com)Record type:
A, AAAA, CNAME, MX, TXT, NS, SOA, etc.Time to live in seconds for this record
Record data:
- IP address for A or AAAA records
- FQDN for CNAME records
- Priority and hostname for MX records
- Text content for TXT records
- etc.
Record format specification
The input string must follow this tab-separated format:- name - Fully qualified domain name
- ttl - Time to live (numeric, in seconds)
- IN - Internet class (must be “IN”)
- type - Record type (A, AAAA, CNAME, MX, TXT, etc.)
- data - Record data
- The record has at least 5 tab-separated parts
- The third field is “IN” (Internet class)