yargs
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -206,6 +206,17 @@ // fancy-pants parsing of argv, originally forked | ||
setKey(argv, key.split('.'), value); | ||
var splitKey = key.split('.'); | ||
setKey(argv, splitKey, value); | ||
(aliases[key] || []).forEach(function (x) { | ||
setKey(argv, x.split('.'), value); | ||
(aliases[splitKey[0]] || []).forEach(function (x) { | ||
x = x.split('.'); | ||
// handle populating dot notation for both | ||
// the key and its aliases. | ||
if (splitKey.length > 1) { | ||
var a = [].concat(splitKey); | ||
a.shift(); // nuke the old key. | ||
x = x.concat(a); | ||
} | ||
setKey(argv, x, value); | ||
}); | ||
@@ -212,0 +223,0 @@ |
{ | ||
"name": "yargs", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Light-weight option parsing with an argv hash. No optstrings attached.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
55997
1031