Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/token.js')
-rw-r--r--deps/npm/lib/token.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/deps/npm/lib/token.js b/deps/npm/lib/token.js
index b737b5ffbca..1e78584c779 100644
--- a/deps/npm/lib/token.js
+++ b/deps/npm/lib/token.js
@@ -30,18 +30,18 @@ const InvalidCIDRError = (msg) =>
token.subcommands = ['list', 'revoke', 'create']
-token.completion = function (opts, cb) {
+token.completion = async (opts) => {
var argv = opts.conf.argv.remain
if (argv.length === 2)
- return cb(null, token.subcommands)
+ return token.subcommands
switch (argv[2]) {
case 'list':
case 'revoke':
case 'create':
- return cb(null, [])
+ return []
default:
- return cb(new Error(argv[2] + ' not recognized'))
+ throw new Error(argv[2] + ' not recognized')
}
}