2.0.1 • Published 4 years ago

one-dot v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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.
2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.0

5 years ago