one-dot
v2.0.1
Published
CloudFlare's 1.1.1.1 DNS service in NodeJS.
Downloads
3
Readme
One Dot
CloudFlare's 1.1.1.1 DNS service in NodeJS.
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 useoneDot
oroneDot.https
for HTTPS andoneDot.tls
for TLS. - The Promise system has been changed to use native Promises via async/await instead of Bluebird.
- Callback support has been removed.
TypeError
s instead ofReferenceError
s are now returned if an invaliddomain
ortype
is provided.