Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80529 views
1
var subarg = require('../');
2
var test = require('tape');
3
4
test('recursive', function (t) {
5
t.plan(1);
6
7
t.deepEqual(
8
subarg('-a [ -b [ -c [ -d 5 ] ] ] -e 3'.split(/\s+/)),
9
{
10
_: [],
11
a: {
12
_: [],
13
b: {
14
_: [],
15
c: {
16
_: [],
17
d: 5
18
}
19
}
20
},
21
e: 3
22
}
23
);
24
});
25
26