{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/2","id":75569785,"html_url":"https://github.com/sindresorhus/skin-tone/pull/2","diff_url":"https://github.com/sindresorhus/skin-tone/pull/2.diff","patch_url":"https://github.com/sindresorhus/skin-tone/pull/2.patch","issue_url":"https://api.github.com/repos/sindresorhus/skin-tone/issues/2","number":2,"state":"closed","locked":false,"title":"Add support for named types","user":{"login":"markogresak","id":6675751,"avatar_url":"https://avatars.githubusercontent.com/u/6675751?v=3","gravatar_id":"","url":"https://api.github.com/users/markogresak","html_url":"https://github.com/markogresak","followers_url":"https://api.github.com/users/markogresak/followers","following_url":"https://api.github.com/users/markogresak/following{/other_user}","gists_url":"https://api.github.com/users/markogresak/gists{/gist_id}","starred_url":"https://api.github.com/users/markogresak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markogresak/subscriptions","organizations_url":"https://api.github.com/users/markogresak/orgs","repos_url":"https://api.github.com/users/markogresak/repos","events_url":"https://api.github.com/users/markogresak/events{/privacy}","received_events_url":"https://api.github.com/users/markogresak/received_events","type":"User","site_admin":false},"body":"The #1 got me thinking. More specifically, the comment about exporting constants, since that really is an unusual practice. \r\nThis PR is adding support for named skin tones, for example:\r\n\r\n``` js\r\nskinTone('👍', 'dark');\r\n//=> '👍🏾\r\nskinTone('👍', 'dark brown');\r\n//=> '👍🏿\r\n```\r\n\r\nFull description in readme at the bottom. Basically anything that `lodash.snakecase` can convert to one of the constant names is acceptable as name. \r\n\r\nOn a side note, also added check and tests for unexpected `type`, which is any number not in range 0..5, a string not matching any of the constants or any other type. ","created_at":"2016-06-29T00:00:59Z","updated_at":"2016-07-04T19:33:23Z","closed_at":"2016-07-04T19:33:23Z","merged_at":null,"merge_commit_sha":"4796936d059ba28a73447a565a4f0b1de982e985","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/2/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/2/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/skin-tone/issues/2/comments","statuses_url":"https://api.github.com/repos/sindresorhus/skin-tone/statuses/6c98e662c202b48196bc6bc6171fd8dcb9983153","head":{"label":"markogresak:feature/string-name","ref":"feature/string-name","sha":"6c98e662c202b48196bc6bc6171fd8dcb9983153","user":{"login":"markogresak","id":6675751,"avatar_url":"https://avatars.githubusercontent.com/u/6675751?v=3","gravatar_id":"","url":"https://api.github.com/users/markogresak","html_url":"https://github.com/markogresak","followers_url":"https://api.github.com/users/markogresak/followers","following_url":"https://api.github.com/users/markogresak/following{/other_user}","gists_url":"https://api.github.com/users/markogresak/gists{/gist_id}","starred_url":"https://api.github.com/users/markogresak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markogresak/subscriptions","organizations_url":"https://api.github.com/users/markogresak/orgs","repos_url":"https://api.github.com/users/markogresak/repos","events_url":"https://api.github.com/users/markogresak/events{/privacy}","received_events_url":"https://api.github.com/users/markogresak/received_events","type":"User","site_admin":false},"repo":{"id":62170649,"name":"skin-tone","full_name":"markogresak/skin-tone","owner":{"login":"markogresak","id":6675751,"avatar_url":"https://avatars.githubusercontent.com/u/6675751?v=3","gravatar_id":"","url":"https://api.github.com/users/markogresak","html_url":"https://github.com/markogresak","followers_url":"https://api.github.com/users/markogresak/followers","following_url":"https://api.github.com/users/markogresak/following{/other_user}","gists_url":"https://api.github.com/users/markogresak/gists{/gist_id}","starred_url":"https://api.github.com/users/markogresak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markogresak/subscriptions","organizations_url":"https://api.github.com/users/markogresak/orgs","repos_url":"https://api.github.com/users/markogresak/repos","events_url":"https://api.github.com/users/markogresak/events{/privacy}","received_events_url":"https://api.github.com/users/markogresak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markogresak/skin-tone","description":"Change the skin tone of an emoji","fork":true,"url":"https://api.github.com/repos/markogresak/skin-tone","forks_url":"https://api.github.com/repos/markogresak/skin-tone/forks","keys_url":"https://api.github.com/repos/markogresak/skin-tone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markogresak/skin-tone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markogresak/skin-tone/teams","hooks_url":"https://api.github.com/repos/markogresak/skin-tone/hooks","issue_events_url":"https://api.github.com/repos/markogresak/skin-tone/issues/events{/number}","events_url":"https://api.github.com/repos/markogresak/skin-tone/events","assignees_url":"https://api.github.com/repos/markogresak/skin-tone/assignees{/user}","branches_url":"https://api.github.com/repos/markogresak/skin-tone/branches{/branch}","tags_url":"https://api.github.com/repos/markogresak/skin-tone/tags","blobs_url":"https://api.github.com/repos/markogresak/skin-tone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markogresak/skin-tone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markogresak/skin-tone/git/refs{/sha}","trees_url":"https://api.github.com/repos/markogresak/skin-tone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markogresak/skin-tone/statuses/{sha}","languages_url":"https://api.github.com/repos/markogresak/skin-tone/languages","stargazers_url":"https://api.github.com/repos/markogresak/skin-tone/stargazers","contributors_url":"https://api.github.com/repos/markogresak/skin-tone/contributors","subscribers_url":"https://api.github.com/repos/markogresak/skin-tone/subscribers","subscription_url":"https://api.github.com/repos/markogresak/skin-tone/subscription","commits_url":"https://api.github.com/repos/markogresak/skin-tone/commits{/sha}","git_commits_url":"https://api.github.com/repos/markogresak/skin-tone/git/commits{/sha}","comments_url":"https://api.github.com/repos/markogresak/skin-tone/comments{/number}","issue_comment_url":"https://api.github.com/repos/markogresak/skin-tone/issues/comments{/number}","contents_url":"https://api.github.com/repos/markogresak/skin-tone/contents/{+path}","compare_url":"https://api.github.com/repos/markogresak/skin-tone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markogresak/skin-tone/merges","archive_url":"https://api.github.com/repos/markogresak/skin-tone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markogresak/skin-tone/downloads","issues_url":"https://api.github.com/repos/markogresak/skin-tone/issues{/number}","pulls_url":"https://api.github.com/repos/markogresak/skin-tone/pulls{/number}","milestones_url":"https://api.github.com/repos/markogresak/skin-tone/milestones{/number}","notifications_url":"https://api.github.com/repos/markogresak/skin-tone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markogresak/skin-tone/labels{/name}","releases_url":"https://api.github.com/repos/markogresak/skin-tone/releases{/id}","deployments_url":"https://api.github.com/repos/markogresak/skin-tone/deployments","created_at":"2016-06-28T20:05:42Z","updated_at":"2016-06-28T20:05:43Z","pushed_at":"2016-06-28T23:55:27Z","git_url":"git://github.com/markogresak/skin-tone.git","ssh_url":"git@github.com:markogresak/skin-tone.git","clone_url":"https://github.com/markogresak/skin-tone.git","svn_url":"https://github.com/markogresak/skin-tone","homepage":"","size":14,"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":"031e072be35350eaf94dd5a9c3a98a7d352477f6","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":62070179,"name":"skin-tone","full_name":"sindresorhus/skin-tone","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/skin-tone","description":"Change the skin tone of an emoji","fork":false,"url":"https://api.github.com/repos/sindresorhus/skin-tone","forks_url":"https://api.github.com/repos/sindresorhus/skin-tone/forks","keys_url":"https://api.github.com/repos/sindresorhus/skin-tone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/skin-tone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/skin-tone/teams","hooks_url":"https://api.github.com/repos/sindresorhus/skin-tone/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/skin-tone/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/skin-tone/events","assignees_url":"https://api.github.com/repos/sindresorhus/skin-tone/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/skin-tone/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/skin-tone/tags","blobs_url":"https://api.github.com/repos/sindresorhus/skin-tone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/skin-tone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/skin-tone/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/skin-tone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/skin-tone/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/skin-tone/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/skin-tone/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/skin-tone/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/skin-tone/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/skin-tone/subscription","commits_url":"https://api.github.com/repos/sindresorhus/skin-tone/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/skin-tone/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/skin-tone/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/skin-tone/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/skin-tone/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/skin-tone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/skin-tone/merges","archive_url":"https://api.github.com/repos/sindresorhus/skin-tone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/skin-tone/downloads","issues_url":"https://api.github.com/repos/sindresorhus/skin-tone/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/skin-tone/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/skin-tone/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/skin-tone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/skin-tone/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/skin-tone/releases{/id}","deployments_url":"https://api.github.com/repos/sindresorhus/skin-tone/deployments","created_at":"2016-06-27T16:15:31Z","updated_at":"2016-07-01T23:32:12Z","pushed_at":"2016-07-04T19:31:32Z","git_url":"git://github.com/sindresorhus/skin-tone.git","ssh_url":"git@github.com:sindresorhus/skin-tone.git","clone_url":"https://github.com/sindresorhus/skin-tone.git","svn_url":"https://github.com/sindresorhus/skin-tone","homepage":"","size":4,"stargazers_count":28,"watchers_count":28,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/2"},"html":{"href":"https://github.com/sindresorhus/skin-tone/pull/2"},"issue":{"href":"https://api.github.com/repos/sindresorhus/skin-tone/issues/2"},"comments":{"href":"https://api.github.com/repos/sindresorhus/skin-tone/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/skin-tone/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/skin-tone/statuses/6c98e662c202b48196bc6bc6171fd8dcb9983153"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":0,"commits":13,"additions":184,"deletions":27,"changed_files":4}}
{"actor":{"display_login":"sindresorhus"}}