This package intends to import and export RFC compliant DNS resource records. Please raise an issue if you cannot pass a valid resource record or you can pass an invalid resource record.
This package is for working with individual Resource Records. For working with zones of RRs, use dns-zone.
Validate records by passing a properly formatted JS object to the record-specific class. To validate an A record:
const validatedA = newRR.A(exampleRRs.A)
Manipulate the validated record using pattern named setters:
console.log(validatedA.toBind())
test.example.com. 3600IN A 192.0.2.127
validatedA.setAddress('192.0.2.128')
console.log(validatedA.toBind())
test.example.com. 3600IN A 192.0.2.128
The setters are named: set + Field, where field is the resource record field name to modify. Multi-word names are camel cased, so a field named Certificate Usage has a setter named setCertificateUsage. The RFCs aren't always consistent regarding RR field names so aliases are permissible for interoperability.
FUNCTIONS
Get the field names for each RR type with getFields():
console.log(newRR.A(exampleRRs.A).toBind())
test.example.com3600IN A 192.0.2.127console.log(newRR.AAAA(exampleRRs.AAAA).toBind())
test.example.com3600INAAAA2605:7900:20:a::4
to{Bind|MaraDNS} output can be influenced (suppress TTL, class, relative domain names) with an options object. See it in bin/dns-zone in the dns-zone package.
RFC 4034: if the type of RR is NS, MD, MF, CNAME, SOA, MB,
MG, MR, PTR, HINFO, MINFO, MX, RP, AFSDB, RT, SIG, PX, NXT,
NAPTR, KX, SRV, DNAME, A6, RRSIG, or NSEC, all uppercase
letters in the DNS names contained within the RDATA are replaced by the lowercase letters;
LOC record ingest/out isn't consistent with API
export a web page for each RR type
DEVELOP
this package has no dependencies. That's no accident.
this will be used by a node.js app & a browser based app, so ES modules
The npm package dns-resource-record receives a total of 0 weekly downloads. As such, dns-resource-record popularity was classified as not popular.
We found that dns-resource-record demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.
Last updated on 29 May 2022
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).
LDAPjs, an LDAP Client and Server API for Node.js, was decommissioned after its maintainer received an abusive email from a user, raising concerns about this form of abuse as a potential attack vector.
CISA launched a new project called Vulnrichment to enrich CVEs with details that help prioritize patching and mitigation efforts, as the NVD backlog of unenriched CVEs awaiting analysis surpasses 10,000.