one-dot
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

One Dot Travis CI Build Status

CloudFlare's 1.1.1.1 DNS service in NodeJS.

NPM Badge

Install

npm install one-dot

Usage

const oneDot = require("one-dot");
 
oneDot({ domain: "richie-bendall.ml", type: "a" }).then(console.log);
//=> [{ domain: 'richie-bendall.ml.', type: "A", ttl: 200, data: '104.28.8.130' }, { domain: 'richie-bendall.ml.', type: "A", ttl: 200, data: '104.28.9.130' }]

API

oneDot(options)

oneDot.https(options)

oneDot.tls(options)

options

Type: object

domain

Type: string

The domain name to obtain the DNS records for.

type

Type: string or number

The type of DNS record to obtain.

Upgrading from v1

  • Removed the method option. Instead use oneDot or oneDot.https for HTTPS and oneDot.tls for TLS.
  • The Promise system has been changed to use native Promises via async/await instead of Bluebird.
  • Callback support has been removed.
  • TypeErrors instead of ReferenceErrors are now returned if an invalid domain or type is provided.

Readme

Keywords

Package Sidebar

Install

npm i one-dot

Weekly Downloads

10

Version

2.0.1

License

MIT

Unpacked Size

11.8 kB

Total Files

9

Last publish

Collaborators

  • richienb