mirror of
https://github.com/flynx/argv.js.git
synced 2025-10-28 10:20:09 +00:00
reworked how the bool option type works + now --quiet is a bool...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
6f76720330
commit
d6866ae4b2
9
argv.js
9
argv.js
@ -323,7 +323,8 @@ object.Constructor('Parser', {
|
||||
true
|
||||
: v == 'false' ?
|
||||
false
|
||||
: !!v },
|
||||
//: !!v },
|
||||
: true },
|
||||
int: parseInt,
|
||||
float: parseFloat,
|
||||
number: function(v){ return new Number(v) },
|
||||
@ -943,7 +944,11 @@ object.Constructor('Parser', {
|
||||
'-quiet': {
|
||||
priority: 70,
|
||||
doc: 'quiet mode',
|
||||
default: true, },
|
||||
// XXX test if this prevents us to set the option...
|
||||
// ...the handler can't destingwish whether it was called
|
||||
// with the default or the user-passed value...
|
||||
//default: true,
|
||||
type: 'bool', },
|
||||
|
||||
|
||||
// Stop argument processing...
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-argv",
|
||||
"version": "2.16.3",
|
||||
"version": "2.16.4",
|
||||
"description": "simple argv parser",
|
||||
"main": "argv.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user