{"action":"created","issue":{"url":"https://api.github.com/repos/yargs/yargs-parser/issues/115","repository_url":"https://api.github.com/repos/yargs/yargs-parser","labels_url":"https://api.github.com/repos/yargs/yargs-parser/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/yargs/yargs-parser/issues/115/comments","events_url":"https://api.github.com/repos/yargs/yargs-parser/issues/115/events","html_url":"https://github.com/yargs/yargs-parser/issues/115","id":290355199,"number":115,"title":"Disabling \"flatten-duplicate-arrays\" leads to unexpected results","user":{"login":"FM-96","id":4470619,"avatar_url":"https://avatars0.githubusercontent.com/u/4470619?v=4","gravatar_id":"","url":"https://api.github.com/users/FM-96","html_url":"https://github.com/FM-96","followers_url":"https://api.github.com/users/FM-96/followers","following_url":"https://api.github.com/users/FM-96/following{/other_user}","gists_url":"https://api.github.com/users/FM-96/gists{/gist_id}","starred_url":"https://api.github.com/users/FM-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FM-96/subscriptions","organizations_url":"https://api.github.com/users/FM-96/orgs","repos_url":"https://api.github.com/users/FM-96/repos","events_url":"https://api.github.com/users/FM-96/events{/privacy}","received_events_url":"https://api.github.com/users/FM-96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-22T05:33:03Z","updated_at":"2018-03-31T21:51:34Z","closed_at":null,"author_association":"NONE","body":"Calling this example code:\r\n```javascript\r\nconst yargsParser = require('yargs-parser');\r\n\r\nconst argv = yargsParser(process.argv.slice(2), {\r\n\tarray: ['arr'],\r\n\tconfiguration: {\r\n\t\t'flatten-duplicate-arrays': false,\r\n\t},\r\n});\r\n\r\nconsole.log(JSON.stringify(argv, null, 2));\r\n```\r\nwith these arguments:\r\n\r\n`node example.js --arr One Two Three --arr Four Five Six --arr Seven Eight Nine --arr Ten Eleven Twelve`\r\n\r\nI would expect the following output:\r\n```json\r\n{\r\n  \"_\": [],\r\n  \"arr\": [\r\n    [\r\n      \"One\",\r\n      \"Two\",\r\n      \"Three\"\r\n    ],\r\n    [\r\n      \"Four\",\r\n      \"Five\",\r\n      \"Six\"\r\n    ],\r\n    [\r\n      \"Seven\",\r\n      \"Eight\",\r\n      \"Nine\"\r\n    ],\r\n    [\r\n      \"Ten\",\r\n      \"Eleven\",\r\n      \"Twelve\"\r\n    ]\r\n  ]\r\n}\r\n```\r\nHowever, instead I get this output:\r\n```json\r\n{\r\n  \"_\": [],\r\n  \"arr\": [\r\n    [\r\n      [\r\n        [\r\n          \"One\",\r\n          \"Two\",\r\n          \"Three\"\r\n        ],\r\n        [\r\n          \"Four\",\r\n          \"Five\",\r\n          \"Six\"\r\n        ]\r\n      ],\r\n      [\r\n        \"Seven\",\r\n        \"Eight\",\r\n        \"Nine\"\r\n      ]\r\n    ],\r\n    [\r\n      \"Ten\",\r\n      \"Eleven\",\r\n      \"Twelve\"\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nThis doesn't seem right to me. Is this the expected behaviour? (If so, it is not apparent from the documentation, in my opinion.)"},"comment":{"url":"https://api.github.com/repos/yargs/yargs-parser/issues/comments/377725997","html_url":"https://github.com/yargs/yargs-parser/issues/115#issuecomment-377725997","issue_url":"https://api.github.com/repos/yargs/yargs-parser/issues/115","id":377725997,"user":{"login":"bcoe","id":194609,"avatar_url":"https://avatars3.githubusercontent.com/u/194609?v=4","gravatar_id":"","url":"https://api.github.com/users/bcoe","html_url":"https://github.com/bcoe","followers_url":"https://api.github.com/users/bcoe/followers","following_url":"https://api.github.com/users/bcoe/following{/other_user}","gists_url":"https://api.github.com/users/bcoe/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoe/subscriptions","organizations_url":"https://api.github.com/users/bcoe/orgs","repos_url":"https://api.github.com/users/bcoe/repos","events_url":"https://api.github.com/users/bcoe/events{/privacy}","received_events_url":"https://api.github.com/users/bcoe/received_events","type":"User","site_admin":false},"created_at":"2018-03-31T21:51:33Z","updated_at":"2018-03-31T21:51:33Z","author_association":"OWNER","body":"@FM-96 I agree, this behavior seems incorrect to me. Would you be interested in submitting a failing test for this issue? I'd love help digging into a fix if you have time, and feel like contributing to the project."}}
{"actor":{"display_login":"bcoe"}}