Comparing version 0.0.2 to 0.0.3
@@ -108,4 +108,6 @@ module.exports = function (args, opts) { | ||
if (!broken && key !== '-') { | ||
if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) | ||
if (args[i+1] === '--') { | ||
setArg(key, true); | ||
} | ||
else if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) | ||
&& !flags.bools[key] | ||
@@ -112,0 +114,0 @@ && (aliases[key] ? !flags.bools[aliases[key]] : true)) { |
{ | ||
"name": "minimist", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "parse argument options", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,1 +18,8 @@ var parse = require('../'); | ||
}); | ||
test('-a -- b', function (t) { | ||
t.plan(3); | ||
t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); | ||
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); | ||
t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); | ||
}); |
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
20740
586