Martin Aeschlimann
8b09ead7d2
1.2.2
2019-11-14 16:26:47 +01:00
Martin Aeschlimann
1eb3ddbca6
add typings
2019-11-14 16:26:27 +01:00
Joao Moreno
b069ca52cb
docs
2019-11-11 10:39:08 +01:00
Joao Moreno
fe16365dce
update badge
2019-11-11 10:36:17 +01:00
Joao Moreno
ff14e52704
fix ci
2019-11-11 10:26:02 +01:00
Joao Moreno
ceb4b87410
upgrade test framework
2019-11-11 10:25:44 +01:00
Joao Moreno
edb2d7f408
use azure-pipelines
2019-11-11 10:15:00 +01:00
Joao Moreno
aaeb29a4dc
Merge branch 'fix-bad-regex'
2019-11-11 10:13:21 +01:00
Joao Moreno
7a6868c1aa
add test
2019-08-07 11:35:33 +02:00
Joao Moreno
39bc39518f
1.2.1
2019-08-07 11:15:48 +02:00
Joao Moreno
9576b28df8
add yarn.lock
2019-08-07 11:15:12 +02:00
Joao Moreno
71d20e8be3
add gitignore
2019-08-07 11:15:09 +02:00
Joao Moreno
9b8546dd7b
rename
2019-08-07 11:14:41 +02:00
Joao Moreno
3b49e06f12
fix bad boolean regexp
2019-08-07 11:12:37 +02:00
James Halliday
4cf45a26b9
Merge pull request #63 from lydell/dash-dash-docs-fix
...
move the `opts['--']` example back where it belongs
2015-08-29 00:23:05 -07:00
Simon Lydell
5fa440ef0f
move the `opts['--']` example back where it belongs
...
It was accidentally separated from the `opts['--']` bullet point be the new
option added in commit 6f3cc5d4
.
2015-08-29 09:18:22 +02:00
James Halliday
dc624482fc
1.2.0
2015-08-24 08:56:42 -05:00
James Halliday
f5a48c3e50
fixed kv test
2015-08-24 08:56:31 -05:00
James Halliday
f72ab7f457
failing kv short test
2015-08-24 08:53:37 -05:00
James Halliday
6bbe145291
kv short fix
2015-08-24 08:52:29 -05:00
James Halliday
63416b8cd1
failing -k=v short test
2015-08-24 08:48:44 -05:00
Karissa McKelvey
86b321affe
enforce space between arg key and value
2015-08-24 14:32:43 +01:00
James Halliday
8a5d94cf17
1.1.3
2015-08-06 16:08:52 -07:00
Jeff Barczewski
9c0a6e7de2
fix boolean values with multiple aliases
...
When using a boolean value that has an array of aliases
the aliases show not swallow the next value but should
be treated like other booleans
```javascript
var regular = [ '--herp', 'derp' ];
var alt = [ '--harp', 'derp' ];
var opts = {
alias: { 'h': ['herp', 'harp'] },
boolean: 'h'
};
var argv = parse(regular, opts);
assert.strictEqual(argv.herp, true);
assert.strictEqual(argv.harp, true);
assert.strictEqual(argv._[0], 'derp');
var argvAlt = parse(alt, opts);
assert.strictEqual(argv.herp, true);
assert.strictEqual(argv.harp, true);
assert.strictEqual(argv._[0], 'derp');
```
2015-08-06 13:06:50 -05:00
Jeff Barczewski
0fa3c5b3dd
add failing test - boolean alias array
...
When using a boolean value that has an array of aliases
the aliases swallow the next value
```javascript
var regular = [ '--herp', 'derp' ];
var opts = {
alias: { 'h': ['herp', 'harp'] },
boolean: 'h'
};
var argv = parse(regular, opts);
assert.strictEqual(argv.herp, true); // fails with 'derp'
assert.strictEqual(argv._[0], 'derp'); // fails undefined
```
2015-08-06 12:12:43 -05:00
James Halliday
a8e2fe153a
1.1.2
2015-07-22 12:54:34 -07:00
Jonas Aschenbrenner
8f3dc27cf8
Convert boolean arguments to boolean values
...
When passing the boolean argument with `--boool=true` or `--boool=false`.
2015-07-22 16:12:26 +02:00
James Halliday
25cf778b12
an older npm for 0.8
2015-04-03 15:02:48 -07:00
James Halliday
61ed1d034b
use non-ancient npm, node 0.12 and iojs
2015-04-03 14:58:17 -07:00
James Halliday
bc9d1c4665
1.1.1
2015-03-10 19:30:05 -07:00
James Halliday
806712df91
upgrade tape, fix type issues from old tape version
2015-03-10 19:27:22 -07:00
Dominic Tarr
e5f419a3b5
if the previous value was a boolean, without an default (or with an alias) don't make an array either
2015-03-11 12:03:43 +13:00
Dominic Tarr
6863198e36
check that they type of a value is a boolean, not just that it is currently set to a boolean
2015-03-11 11:35:08 +13:00
Dominic Tarr
8c444fe893
test for setting a boolean to a null default
2015-03-11 11:34:43 +13:00
James Halliday
e2563e462b
1.1.0
2014-08-10 20:18:24 -07:00
James Halliday
e5531ba047
coverage script
2014-08-10 20:18:05 -07:00
James Halliday
02ed371151
reformat package.json
2014-08-10 19:11:20 -07:00
James Halliday
a6972da89e
extra fn to get 100% coverage again
2014-08-10 19:10:53 -07:00
Caitlin Potter
6f3cc5d4e8
add support for handling "unknown" options not registered with the parser.
2014-08-10 19:08:52 -07:00
James Halliday
13077b369b
1.0.0
2014-08-10 18:08:18 -07:00
James Halliday
fef6ae79c3
fix list
2014-08-10 18:07:51 -07:00
Jason Diamond
471c7e4a7e
added stopEarly option
2014-08-10 18:07:13 -07:00
James Halliday
f904dcc3c2
0.2.0
2014-06-19 22:56:34 +08:00
Max Ogden
450a97f6e2
support all-boolean mode
2014-06-19 22:56:19 +08:00
James Halliday
1f976263c6
0.1.0
2014-05-12 03:23:02 +02:00
James Halliday
14db0e6dbc
documented argv['--']
2014-05-12 03:22:31 +02:00
ELLIOTTCABLE
715c1e3714
Adding a test-case for notFlags segregation
2014-05-12 03:16:28 +02:00
ELLIOTTCABLE
ce4a1e63a7
Provide a mechanism to segregate -- arguments
2014-05-12 03:16:27 +02:00
James Halliday
f69fd1932f
0.0.10
2014-05-11 23:42:47 +02:00
James Halliday
46e448f9f5
dedicated boolean test
2014-05-11 23:42:27 +02:00