Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow not to flatten duplicate array types #71

Merged
merged 2 commits into from
Nov 27, 2016

Commits on Nov 24, 2016

  1. feat: allow disabling duplicate-arguments-array

    Lets you disable "duplicates" behaviour
    
    ```
    yargsParser('-x 1 -x 2')
    // => {x: [1, 2]}
    ```
    ```
    yargsParser('-x 1 -x 2', {configuration:{'duplicate-arguments-array': false}})
    // => {x: 2}
    ```
    laggingreflex committed Nov 24, 2016
    Configuration menu
    Copy the full SHA
    d23b473 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2016

  1. 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
    ```
    laggingreflex committed Nov 25, 2016
    Configuration menu
    Copy the full SHA
    4b41e35 View commit details
    Browse the repository at this point in the history