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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-08-18 03:54:54 +0400
committerisaacs <i@izs.me>2011-08-18 03:55:12 +0400
commit8e84a57de64bea4c06d96bad5d1e4053748728b0 (patch)
tree83e58760a7ef56299de29be5411d0278eed6238f
parentd2e23deb9cdc7543a3d2d8d977f4fb157cc04367 (diff)
Preserve other members of command functions
-rw-r--r--npm.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/npm.js b/npm.js
index 9da4790b9..868763418 100644
--- a/npm.js
+++ b/npm.js
@@ -151,8 +151,9 @@ Object.keys(abbrevs).concat(plumbing).forEach(function (c) {
}
cmd.apply(npm, arguments)
}
- commandCache[a].completion = cmd.completion
- commandCache[a].usage = cmd.usage
+ Object.keys(cmd).forEach(function (k) {
+ commandCache[a][k] = cmd[k]
+ })
return commandCache[a]
}, enumerable: fullList.indexOf(c) !== -1 })
})