Comparing version 3.0.3 to 3.0.4
@@ -92,2 +92,3 @@ // fancy-pants parsing of argv, originally forked | ||
// -- seperated by = | ||
if (arg.match(/^--.+=/)) { | ||
@@ -104,2 +105,3 @@ // Using [\s\S] instead of . because js doesn't support the | ||
} | ||
// -- seperated by space. | ||
else if (arg.match(/^--.+/)) { | ||
@@ -121,2 +123,20 @@ var key = arg.match(/^--(.+)/)[1]; | ||
} | ||
// dot-notation flag seperated by '='. | ||
else if (arg.match(/^-.\..+=/)) { | ||
var m = arg.match(/^-([^=]+)=([\s\S]*)$/); | ||
setArg(m[1], m[2]); | ||
} | ||
// dot-notation flag seperated by space. | ||
else if (arg.match(/^-.\..+/)) { | ||
var key = arg.match(/^-(.\..+)/)[1]; | ||
var next = args[i + 1]; | ||
if (next !== undefined && !next.match(/^-/) | ||
&& !checkAllAliases(key, flags.bools)) { | ||
setArg(key, next); | ||
i++; | ||
} | ||
else { | ||
setArg(key, defaultForType(guessType(key, flags))); | ||
} | ||
} | ||
else if (arg.match(/^-[^-]+/)) { | ||
@@ -123,0 +143,0 @@ var letters = arg.slice(1,-1).split(''); |
{ | ||
"name": "yargs", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "Light-weight option parsing with an argv hash. No optstrings attached.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56715
1051