Commit 4b41e35
committed
feat: allow not to flatten duplicate array types
Lets you disable flattening of multiple array type values
```
yargsParser('-x a b -x c d', {array: ['x]})
// => {x: ['a', 'b', 'c', 'd']} // all flattened
```
```
yargsParser('-x a b -x c d', {array: ['x], configuration:{'flatten-duplicate-arrays': false}})
// => {x: [['a', 'b'], ['c', 'd']]} // multiple nested arrays
```1 parent d23b473 commit 4b41e35
2 files changed
+47
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| 315 | + | |
| 316 | + | |
314 | 317 | | |
315 | 318 | | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| 322 | + | |
319 | 323 | | |
320 | 324 | | |
321 | 325 | | |
322 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
323 | 334 | | |
324 | 335 | | |
325 | 336 | | |
| |||
540 | 551 | | |
541 | 552 | | |
542 | 553 | | |
543 | | - | |
| 554 | + | |
544 | 555 | | |
545 | 556 | | |
546 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
1957 | 1990 | | |
1958 | 1991 | | |
1959 | 1992 | | |
| |||
0 commit comments