{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/dargs/pulls/comments/48601937","id":48601937,"diff_hunk":"@@ -63,3 +63,28 @@ test('excludes and includes options', t => {\n test('option to ignore false values', t => {\n \tt.same(fn({foo: false}, {ignoreFalse: true}), []);\n });\n+\n+test('aliases option', function (t) {\n+\tt.same(fn({a: 'foo', file: 'test'}, {\n+\t\taliases: {file: 'f'}\n+\t}),\n+\t\t[\n+\t\t\t'--a=foo',\n+\t\t\t'-f test'\n+\t\t]);\n+});\n+\n+test('includes and aliases options', function (t) {","path":"test.js","position":15,"original_position":15,"commit_id":"99e035add05eb85f3a174a3de2ea3e321e9bc690","original_commit_id":"99e035add05eb85f3a174a3de2ea3e321e9bc690","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"body":"use arrow function like the other tests","created_at":"2015-12-30T12:42:52Z","updated_at":"2015-12-30T12:42:52Z","html_url":"https://github.com/sindresorhus/dargs/pull/21#discussion_r48601937","pull_request_url":"https://api.github.com/repos/sindresorhus/dargs/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/dargs/pulls/comments/48601937"},"html":{"href":"https://github.com/sindresorhus/dargs/pull/21#discussion_r48601937"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/dargs/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/dargs/pulls/21","id":53661592,"html_url":"https://github.com/sindresorhus/dargs/pull/21","diff_url":"https://github.com/sindresorhus/dargs/pull/21.diff","patch_url":"https://github.com/sindresorhus/dargs/pull/21.patch","issue_url":"https://api.github.com/repos/sindresorhus/dargs/issues/21","number":21,"state":"open","locked":false,"title":"Add optional mapping of keys to short arguments","user":{"login":"mshenfield","id":4812055,"avatar_url":"https://avatars.githubusercontent.com/u/4812055?v=3","gravatar_id":"","url":"https://api.github.com/users/mshenfield","html_url":"https://github.com/mshenfield","followers_url":"https://api.github.com/users/mshenfield/followers","following_url":"https://api.github.com/users/mshenfield/following{/other_user}","gists_url":"https://api.github.com/users/mshenfield/gists{/gist_id}","starred_url":"https://api.github.com/users/mshenfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshenfield/subscriptions","organizations_url":"https://api.github.com/users/mshenfield/orgs","repos_url":"https://api.github.com/users/mshenfield/repos","events_url":"https://api.github.com/users/mshenfield/events{/privacy}","received_events_url":"https://api.github.com/users/mshenfield/received_events","type":"User","site_admin":false},"body":"A generic solution to close #16. Allow the user to pass in\r\na `shortargs` object in the `options`. Each entry maps an\r\naccepted value to a short argument. For example, passing\r\n\r\n`dargs({'file': 'value'}, {shortargs: {'file': 'f'}})`\r\n\r\nmight produce an output like\r\n\r\n`[ '-f value']`\r\n\r\nThis is nice because it allows you to work with some commands\r\nthat only support short arg versions of certain arguments (I\r\nwas working with `ctags -f`), while still encouraging you to\r\nexpose expressive, full word arguments to the end user.\r\n\r\nUpdated tests with usage alone and with `includes`, and docs\r\nwith examples and short description.","created_at":"2015-12-15T05:20:10Z","updated_at":"2015-12-30T12:42:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f4300422ec01960fbcf38d637d16549851fce21","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/dargs/pulls/21/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/dargs/pulls/21/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/dargs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/dargs/issues/21/comments","statuses_url":"https://api.github.com/repos/sindresorhus/dargs/statuses/99e035add05eb85f3a174a3de2ea3e321e9bc690","head":{"label":"mshenfield:issue-16-support-short-argument-mappings","ref":"issue-16-support-short-argument-mappings","sha":"99e035add05eb85f3a174a3de2ea3e321e9bc690","user":{"login":"mshenfield","id":4812055,"avatar_url":"https://avatars.githubusercontent.com/u/4812055?v=3","gravatar_id":"","url":"https://api.github.com/users/mshenfield","html_url":"https://github.com/mshenfield","followers_url":"https://api.github.com/users/mshenfield/followers","following_url":"https://api.github.com/users/mshenfield/following{/other_user}","gists_url":"https://api.github.com/users/mshenfield/gists{/gist_id}","starred_url":"https://api.github.com/users/mshenfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshenfield/subscriptions","organizations_url":"https://api.github.com/users/mshenfield/orgs","repos_url":"https://api.github.com/users/mshenfield/repos","events_url":"https://api.github.com/users/mshenfield/events{/privacy}","received_events_url":"https://api.github.com/users/mshenfield/received_events","type":"User","site_admin":false},"repo":{"id":48021295,"name":"dargs","full_name":"mshenfield/dargs","owner":{"login":"mshenfield","id":4812055,"avatar_url":"https://avatars.githubusercontent.com/u/4812055?v=3","gravatar_id":"","url":"https://api.github.com/users/mshenfield","html_url":"https://github.com/mshenfield","followers_url":"https://api.github.com/users/mshenfield/followers","following_url":"https://api.github.com/users/mshenfield/following{/other_user}","gists_url":"https://api.github.com/users/mshenfield/gists{/gist_id}","starred_url":"https://api.github.com/users/mshenfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshenfield/subscriptions","organizations_url":"https://api.github.com/users/mshenfield/orgs","repos_url":"https://api.github.com/users/mshenfield/repos","events_url":"https://api.github.com/users/mshenfield/events{/privacy}","received_events_url":"https://api.github.com/users/mshenfield/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mshenfield/dargs","description":"Reverse minimist. Convert an object of options into an array of command-line arguments","fork":true,"url":"https://api.github.com/repos/mshenfield/dargs","forks_url":"https://api.github.com/repos/mshenfield/dargs/forks","keys_url":"https://api.github.com/repos/mshenfield/dargs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mshenfield/dargs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mshenfield/dargs/teams","hooks_url":"https://api.github.com/repos/mshenfield/dargs/hooks","issue_events_url":"https://api.github.com/repos/mshenfield/dargs/issues/events{/number}","events_url":"https://api.github.com/repos/mshenfield/dargs/events","assignees_url":"https://api.github.com/repos/mshenfield/dargs/assignees{/user}","branches_url":"https://api.github.com/repos/mshenfield/dargs/branches{/branch}","tags_url":"https://api.github.com/repos/mshenfield/dargs/tags","blobs_url":"https://api.github.com/repos/mshenfield/dargs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mshenfield/dargs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mshenfield/dargs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mshenfield/dargs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mshenfield/dargs/statuses/{sha}","languages_url":"https://api.github.com/repos/mshenfield/dargs/languages","stargazers_url":"https://api.github.com/repos/mshenfield/dargs/stargazers","contributors_url":"https://api.github.com/repos/mshenfield/dargs/contributors","subscribers_url":"https://api.github.com/repos/mshenfield/dargs/subscribers","subscription_url":"https://api.github.com/repos/mshenfield/dargs/subscription","commits_url":"https://api.github.com/repos/mshenfield/dargs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mshenfield/dargs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mshenfield/dargs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mshenfield/dargs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mshenfield/dargs/contents/{+path}","compare_url":"https://api.github.com/repos/mshenfield/dargs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mshenfield/dargs/merges","archive_url":"https://api.github.com/repos/mshenfield/dargs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mshenfield/dargs/downloads","issues_url":"https://api.github.com/repos/mshenfield/dargs/issues{/number}","pulls_url":"https://api.github.com/repos/mshenfield/dargs/pulls{/number}","milestones_url":"https://api.github.com/repos/mshenfield/dargs/milestones{/number}","notifications_url":"https://api.github.com/repos/mshenfield/dargs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mshenfield/dargs/labels{/name}","releases_url":"https://api.github.com/repos/mshenfield/dargs/releases{/id}","created_at":"2015-12-15T05:19:13Z","updated_at":"2015-12-15T05:19:14Z","pushed_at":"2015-12-27T20:36:26Z","git_url":"git://github.com/mshenfield/dargs.git","ssh_url":"git@github.com:mshenfield/dargs.git","clone_url":"https://github.com/mshenfield/dargs.git","svn_url":"https://github.com/mshenfield/dargs","homepage":"","size":28,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sindresorhus:master","ref":"master","sha":"0ed0c6f4bca3df2fe12b95a4e5a5fa05e2d444c6","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":9533606,"name":"dargs","full_name":"sindresorhus/dargs","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/dargs","description":"Reverse minimist. Convert an object of options into an array of command-line arguments","fork":false,"url":"https://api.github.com/repos/sindresorhus/dargs","forks_url":"https://api.github.com/repos/sindresorhus/dargs/forks","keys_url":"https://api.github.com/repos/sindresorhus/dargs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/dargs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/dargs/teams","hooks_url":"https://api.github.com/repos/sindresorhus/dargs/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/dargs/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/dargs/events","assignees_url":"https://api.github.com/repos/sindresorhus/dargs/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/dargs/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/dargs/tags","blobs_url":"https://api.github.com/repos/sindresorhus/dargs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/dargs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/dargs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/dargs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/dargs/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/dargs/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/dargs/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/dargs/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/dargs/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/dargs/subscription","commits_url":"https://api.github.com/repos/sindresorhus/dargs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/dargs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/dargs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/dargs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/dargs/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/dargs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/dargs/merges","archive_url":"https://api.github.com/repos/sindresorhus/dargs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/dargs/downloads","issues_url":"https://api.github.com/repos/sindresorhus/dargs/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/dargs/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/dargs/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/dargs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/dargs/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/dargs/releases{/id}","created_at":"2013-04-18T22:51:22Z","updated_at":"2015-12-27T19:09:38Z","pushed_at":"2015-12-29T17:10:48Z","git_url":"git://github.com/sindresorhus/dargs.git","ssh_url":"git@github.com:sindresorhus/dargs.git","clone_url":"https://github.com/sindresorhus/dargs.git","svn_url":"https://github.com/sindresorhus/dargs","homepage":"","size":42,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/dargs/pulls/21"},"html":{"href":"https://github.com/sindresorhus/dargs/pull/21"},"issue":{"href":"https://api.github.com/repos/sindresorhus/dargs/issues/21"},"comments":{"href":"https://api.github.com/repos/sindresorhus/dargs/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/dargs/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/dargs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/dargs/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/dargs/statuses/99e035add05eb85f3a174a3de2ea3e321e9bc690"}}}}