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:
-rwxr-xr-xcli.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli.js b/cli.js
index 7b80cf551..1fcca7417 100755
--- a/cli.js
+++ b/cli.js
@@ -39,6 +39,9 @@ while (arg = argv.shift()) {
if (key === "help") conf[key] = true, key = null
flagsDone = (key === "")
} else if (key) {
+ if (arg === "false" || arg === "null") arg = JSON.parse(arg)
+ else if ( arg === "undefined" ) arg = undefined
+ else if (!isNaN(arg)) arg = +arg
conf[key] = arg
key = null
} else arglist.push(arg)