Comparing version 0.0.7 to 0.0.8
@@ -77,3 +77,3 @@ module.exports = function (args, opts) { | ||
else { | ||
setArg(key, true); | ||
setArg(key, flags.strings[key] ? '' : true); | ||
} | ||
@@ -106,3 +106,3 @@ } | ||
else { | ||
setArg(letters[j], true); | ||
setArg(letters[j], flags.strings[letters[j]] ? '' : true); | ||
} | ||
@@ -124,3 +124,3 @@ } | ||
else { | ||
setArg(key, true); | ||
setArg(key, flags.strings[key] ? '' : true); | ||
} | ||
@@ -127,0 +127,0 @@ } |
{ | ||
"name": "minimist", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "parse argument options", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -165,2 +165,23 @@ var parse = require('../'); | ||
test('empty strings', function(t) { | ||
var s = parse([ '-s' ], { string: 's' }).s; | ||
t.equal(s, ''); | ||
t.equal(typeof s, 'string'); | ||
var str = parse([ '--str' ], { string: 'str' }).str; | ||
t.equal(str, ''); | ||
t.equal(typeof str, 'string'); | ||
var letters = parse([ '-art' ], { | ||
string: [ 'a', 't' ] | ||
}); | ||
t.equal(letters.a, ''); | ||
t.equal(letters.r, true); | ||
t.equal(letters.t, ''); | ||
t.end(); | ||
}); | ||
test('slashBreak', function (t) { | ||
@@ -167,0 +188,0 @@ t.same( |
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
21274
602