Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
added resolve command
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenet authored and alanshaw committed Aug 6, 2018
1 parent ef5a4a3 commit 00dcb41
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/resolve.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict'

const promisify = require('promisify-es6')

const transform = function (res, callback) {
callback(null, res.Path)
}

module.exports = (send) => {
return promisify((args, opts, callback) => {
if (typeof (opts) === 'function') {
callback = opts
opts = {}
}

send.andTransform({
path: 'resolve',
args: args,
qs: opts
}, transform, callback)
})
}
1 change: 1 addition & 0 deletions src/utils/load-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function requireCommands () {
update: require('../update'),
version: require('../version'),
types: require('../types'),
resolve: require('../resolve'),
dns: require('../dns')
}

Expand Down

0 comments on commit 00dcb41

Please sign in to comment.