1.0.1 • Published 5 years ago

aladinnetowrk-zonefile v1.0.1

Weekly downloads
4
License
-
Repository
-
Last release
5 years ago

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()