Socket
Socket
Sign inDemoInstall

edit-dns

Package Overview
Dependencies
1
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    edit-dns

TS library to load, save and recover DNS files


Version published
Maintainers
1
Install size
502 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 25 Apr 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc