substack/minimist — pull request #6 by trevorsenior (2014-02-20 01:10:16+00:00)
Title: return '' if flag is string and empty

If we define a flag to be a string, it should always return a string.

Previously:
```javascript
parse([ '-s' ], { string: 's' }).s; // true
parse([ '-s ""' ], { string: 's' }).s; // ""
```

Now it correctly returns a string instead of a boolean when empty quotes are not specified:

```javascript
parse([ '-s' ], { string: 's' }).s; // ""
parse([ '-s ""' ], { string: 's' }).s; // ""
```

- - -

I didn't include cases when using joined flags such as `-art`. I wasn't sure how practical that would be, e.g.

```javascript
var argv = parse([ '-art' ], {
string: [ 'a', 't' ]
})
```

In the above, `argv.a` will still return `true` instead of `""`, but `argv.t` will still correctly be `""`.