edit-dns
TypeScript icon, indicating that this package has built-in type declarations

1.1.18 • Public • Published

edit-dns Build Status

TS library to load, save and recover DNS files

Docs

Install

NPM

npm i edit-dns

Yarn

yarn add edit-dns

Usage

import DnsEditor from 'edit-dns'
 
const dnsEditor = new DnsEditor('TestApp')
 
(async () => {
    // Saves current DNS settings
    await dnsEditor.save()
 
    // Load new DNS settings
    await dnsEditor.load(['1.1.1.1'])
 
    // Check DNS entry exists
    console.log(await dnsEditor.exists('1.1.1.1')) // true
 
    // Recover saved settings
    await dnsEditor.recover()
 
    // Check DNS entry does not exist
    console.log(await dnsEditor.exists('1.1.1.1')) // false
})()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.18
    1
    • latest

Version History

Package Sidebar

Install

npm i edit-dns

Weekly Downloads

27

Version

1.1.18

License

MIT

Unpacked Size

193 kB

Total Files

31

Last publish

Collaborators

  • jafri