aladinnetowrk-zonefile
v1.0.1
Published
A DNS zone file parser and generator
Downloads
10
Maintainers
Readme
aladinnetwork-zonefile
Installation
$ npm install aladinnetwork-zonefile
Usage
Making Zone Files
import { makeZoneFile } from 'aladinnetwork-zonefile'
let zoneFileText = makeZoneFile(zoneFileJson)
Parsing Zone Files
import { parseZoneFile } from 'aladinnetwork-zonefile'
let zoneFileJson = parseZoneFile(zoneFileText)
Zone File Objects
import { ZoneFile } from 'aladinnetwork-zonefile'
let zoneFileData = {
"$origin": "MYDOMAIN.COM.",
"$ttl": 3600,
"a": [
{ "name": "@", "ip": "127.0.0.1" },
{ "name": "www", "ip": "127.0.0.1" }
]
}
let zoneFile = new ZoneFile(zoneFileData)
let zoneFileString = zoneFile.toString()
let zoneFileJson = zoneFile.toJSON()