This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: dns * Update README.md * Update README.md * chore: update deps
- Loading branch information
Showing
4 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict' | ||
|
||
const promisify = require('promisify-es6') | ||
const moduleConfig = require('./utils/module-config') | ||
|
||
const transform = function (res, callback) { | ||
callback(null, res.Path) | ||
} | ||
|
||
module.exports = (arg) => { | ||
const send = moduleConfig(arg) | ||
|
||
return promisify((args, opts, callback) => { | ||
if (typeof (opts) === 'function') { | ||
callback = opts | ||
opts = {} | ||
} | ||
|
||
send.andTransform({ | ||
path: 'dns', | ||
args: args, | ||
qs: opts | ||
}, transform, callback) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters