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/set.js')
-rw-r--r--deps/npm/lib/set.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/deps/npm/lib/set.js b/deps/npm/lib/set.js
index fd607629328..3d61c1e93e2 100644
--- a/deps/npm/lib/set.js
+++ b/deps/npm/lib/set.js
@@ -1,14 +1,14 @@
+const npm = require('./npm.js')
+const config = require('./config.js')
-module.exports = set
+const usage = 'npm set <key>=<value> [<key>=<value> ...] (See `npm config`)'
-set.usage = 'npm set <key>=<value> [<key>=<value> ...] (See `npm config`)'
+const completion = config.completion
-var npm = require('./npm.js')
-
-set.completion = npm.commands.config.completion
-
-function set (args, cb) {
+const cmd = (args, cb) => {
if (!args.length)
- return cb(set.usage)
+ return cb(usage)
npm.commands.config(['set'].concat(args), cb)
}
+
+module.exports = Object.assign(cmd, { usage, completion })