{"action":"created","issue":{"url":"https://api.github.com/repos/substack/minimist/issues/61","labels_url":"https://api.github.com/repos/substack/minimist/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/substack/minimist/issues/61/comments","events_url":"https://api.github.com/repos/substack/minimist/issues/61/events","html_url":"https://github.com/substack/minimist/pull/61","id":99495067,"number":61,"title":"fix boolean values with multiple aliases","user":{"login":"jeffbski","id":5689,"avatar_url":"https://avatars.githubusercontent.com/u/5689?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbski","html_url":"https://github.com/jeffbski","followers_url":"https://api.github.com/users/jeffbski/followers","following_url":"https://api.github.com/users/jeffbski/following{/other_user}","gists_url":"https://api.github.com/users/jeffbski/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbski/subscriptions","organizations_url":"https://api.github.com/users/jeffbski/orgs","repos_url":"https://api.github.com/users/jeffbski/repos","events_url":"https://api.github.com/users/jeffbski/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-06T18:17:22Z","updated_at":"2015-08-06T23:09:29Z","closed_at":"2015-08-06T23:08:39Z","pull_request":{"url":"https://api.github.com/repos/substack/minimist/pulls/61","html_url":"https://github.com/substack/minimist/pull/61","diff_url":"https://github.com/substack/minimist/pull/61.diff","patch_url":"https://github.com/substack/minimist/pull/61.patch"},"body":"When using a boolean value that has an array of aliases\r\nthe aliases show not swallow the next value but should\r\nbe treated like other booleans\r\n\r\n```javascript\r\nvar regular = [ '--herp', 'derp' ];\r\nvar alt = [ '--harp', 'derp' ];\r\nvar opts = {\r\n  alias: { 'h': ['herp', 'harp'] },\r\n  boolean: 'h'\r\n};\r\n\r\nvar argv = parse(regular, opts);\r\nassert.strictEqual(argv.herp, true); // fails with 'derp'\r\nassert.strictEqual(argv.harp, true); // fails with 'derp'\r\nassert.strictEqual(argv._[0], 'derp'); // fails with undefined\r\n\r\nvar argvAlt = parse(alt, opts);\r\nassert.strictEqual(argv.herp, true); // fails with 'derp'\r\nassert.strictEqual(argv.harp, true); // fails with 'derp'\r\nassert.strictEqual(argv._[0], 'derp'); // fails with undefined\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/substack/minimist/issues/comments/128536129","html_url":"https://github.com/substack/minimist/pull/61#issuecomment-128536129","issue_url":"https://api.github.com/repos/substack/minimist/issues/61","id":128536129,"user":{"login":"jeffbski","id":5689,"avatar_url":"https://avatars.githubusercontent.com/u/5689?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbski","html_url":"https://github.com/jeffbski","followers_url":"https://api.github.com/users/jeffbski/followers","following_url":"https://api.github.com/users/jeffbski/following{/other_user}","gists_url":"https://api.github.com/users/jeffbski/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbski/subscriptions","organizations_url":"https://api.github.com/users/jeffbski/orgs","repos_url":"https://api.github.com/users/jeffbski/repos","events_url":"https://api.github.com/users/jeffbski/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbski/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T23:09:29Z","updated_at":"2015-08-06T23:09:29Z","body":"Thanks!"}}