{"action":"created","comment":{"url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/comments/48586090","id":48586090,"diff_hunk":"@@ -1,43 +1,46 @@\n import {Children} from 'react';\n import _ from 'lodash';\n \n-const customPropTypes = {\n-  /*\n-   * Ensures children are of a set of types\n-   * Similar to `oneOfType` built-in validator\n-   * @param {Array<string>} allowedTypes Collection of allowed Stardust component types\n-   * @returns {Array} containing children of the specified type\n-   */\n-  ofComponentTypes: (allowedTypes) => {\n-    return (props, propName, componentName) => {\n-      const {children} = props;\n-      const disallowed = Children.map(children, child => {\n-        return _.includes(allowedTypes, _.get(child, 'type._meta.name')) ? null : child;\n-      });\n-      if (disallowed && disallowed.length !== 0) {\n+/*\n+ * Ensures children are of a set of types\n+ * Similar to `oneOfType` built-in validator\n+ * @param {Array<string>} allowedTypes Collection of allowed Stardust component types\n+ * @returns {Array} containing children of the specified type\n+ */\n+export const ofComponentTypes = (allowedTypes) => {\n+  return (props, propName, componentName) => {\n+    const {children} = props;\n+    const disallowed = Children.map(children, child => {\n+      return _.includes(allowedTypes, _.get(child, 'type._meta.name')) ? null : child;\n+    });\n+    if (disallowed && disallowed.length !== 0) {\n+      return new Error(\n+        `\\`${componentName}\\` should only have children of type \\`${allowedTypes}\\`.`\n+      );\n+    }\n+  };\n+};\n+\n+/*\n+ * Verifies exclusivity of a given prop\n+ * @param {string} exclusives property used for exclusivity check\n+ * @throws {Error} if named prop not mutually exclusive\n+ * @returns no-op\n+ */\n+export const mutuallyExclusive = (exclusives) => {\n+  return (props, propName, componentName) => {\n+    _.forEach(exclusives, exclusiveProp => {\n+      if (props[propName] && props[exclusiveProp]) {\n         return new Error(\n-          `\\`${componentName}\\` should only have children of type \\`${allowedTypes}\\`.`\n+          `\\`${componentName}\\` should only have one of type \\`${propName}\\` or \\`${exclusiveProp}\\` not both.`","path":"src/utils/customPropTypes.js","position":50,"original_position":50,"commit_id":"f36155afffe4cf3becc55c4245e33ccc746727da","original_commit_id":"f36155afffe4cf3becc55c4245e33ccc746727da","user":{"login":"levithomason","id":5067638,"avatar_url":"https://avatars.githubusercontent.com/u/5067638?v=3","gravatar_id":"","url":"https://api.github.com/users/levithomason","html_url":"https://github.com/levithomason","followers_url":"https://api.github.com/users/levithomason/followers","following_url":"https://api.github.com/users/levithomason/following{/other_user}","gists_url":"https://api.github.com/users/levithomason/gists{/gist_id}","starred_url":"https://api.github.com/users/levithomason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levithomason/subscriptions","organizations_url":"https://api.github.com/users/levithomason/orgs","repos_url":"https://api.github.com/users/levithomason/repos","events_url":"https://api.github.com/users/levithomason/events{/privacy}","received_events_url":"https://api.github.com/users/levithomason/received_events","type":"User","site_admin":false},"body":"Thanks for the fix here!","created_at":"2015-12-30T04:17:28Z","updated_at":"2015-12-30T04:17:28Z","html_url":"https://github.com/TechnologyAdvice/stardust/pull/141#discussion_r48586090","pull_request_url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/comments/48586090"},"html":{"href":"https://github.com/TechnologyAdvice/stardust/pull/141#discussion_r48586090"},"pull_request":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141","id":54679991,"html_url":"https://github.com/TechnologyAdvice/stardust/pull/141","diff_url":"https://github.com/TechnologyAdvice/stardust/pull/141.diff","patch_url":"https://github.com/TechnologyAdvice/stardust/pull/141.patch","issue_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/141","number":141,"state":"open","locked":false,"title":"fix(customPropTypes): use named exports rather than default object","user":{"login":"davezuko","id":6439050,"avatar_url":"https://avatars.githubusercontent.com/u/6439050?v=3","gravatar_id":"","url":"https://api.github.com/users/davezuko","html_url":"https://github.com/davezuko","followers_url":"https://api.github.com/users/davezuko/followers","following_url":"https://api.github.com/users/davezuko/following{/other_user}","gists_url":"https://api.github.com/users/davezuko/gists{/gist_id}","starred_url":"https://api.github.com/users/davezuko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davezuko/subscriptions","organizations_url":"https://api.github.com/users/davezuko/orgs","repos_url":"https://api.github.com/users/davezuko/repos","events_url":"https://api.github.com/users/davezuko/events{/privacy}","received_events_url":"https://api.github.com/users/davezuko/received_events","type":"User","site_admin":false},"body":"This fixes a Babel 6 issue where components destructuring this utility would break since keys on default exports are no longer treated as named exports.\r\n\r\nFor example:\r\n\r\n```js\r\nimport {ofComponentTypes} from 'src/utils/customPropTypes'\r\n```","created_at":"2015-12-28T20:03:24Z","updated_at":"2015-12-30T04:17:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"692313b4073d320b3c481c2dbafcfe2f0000e70f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141/commits","review_comments_url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141/comments","review_comment_url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/141/comments","statuses_url":"https://api.github.com/repos/TechnologyAdvice/stardust/statuses/f36155afffe4cf3becc55c4245e33ccc746727da","head":{"label":"TechnologyAdvice:fix/customPropTypes","ref":"fix/customPropTypes","sha":"f36155afffe4cf3becc55c4245e33ccc746727da","user":{"login":"TechnologyAdvice","id":6045188,"avatar_url":"https://avatars.githubusercontent.com/u/6045188?v=3","gravatar_id":"","url":"https://api.github.com/users/TechnologyAdvice","html_url":"https://github.com/TechnologyAdvice","followers_url":"https://api.github.com/users/TechnologyAdvice/followers","following_url":"https://api.github.com/users/TechnologyAdvice/following{/other_user}","gists_url":"https://api.github.com/users/TechnologyAdvice/gists{/gist_id}","starred_url":"https://api.github.com/users/TechnologyAdvice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechnologyAdvice/subscriptions","organizations_url":"https://api.github.com/users/TechnologyAdvice/orgs","repos_url":"https://api.github.com/users/TechnologyAdvice/repos","events_url":"https://api.github.com/users/TechnologyAdvice/events{/privacy}","received_events_url":"https://api.github.com/users/TechnologyAdvice/received_events","type":"Organization","site_admin":false},"repo":{"id":37734226,"name":"stardust","full_name":"TechnologyAdvice/stardust","owner":{"login":"TechnologyAdvice","id":6045188,"avatar_url":"https://avatars.githubusercontent.com/u/6045188?v=3","gravatar_id":"","url":"https://api.github.com/users/TechnologyAdvice","html_url":"https://github.com/TechnologyAdvice","followers_url":"https://api.github.com/users/TechnologyAdvice/followers","following_url":"https://api.github.com/users/TechnologyAdvice/following{/other_user}","gists_url":"https://api.github.com/users/TechnologyAdvice/gists{/gist_id}","starred_url":"https://api.github.com/users/TechnologyAdvice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechnologyAdvice/subscriptions","organizations_url":"https://api.github.com/users/TechnologyAdvice/orgs","repos_url":"https://api.github.com/users/TechnologyAdvice/repos","events_url":"https://api.github.com/users/TechnologyAdvice/events{/privacy}","received_events_url":"https://api.github.com/users/TechnologyAdvice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TechnologyAdvice/stardust","description":"React component library based on Semantic UI","fork":false,"url":"https://api.github.com/repos/TechnologyAdvice/stardust","forks_url":"https://api.github.com/repos/TechnologyAdvice/stardust/forks","keys_url":"https://api.github.com/repos/TechnologyAdvice/stardust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TechnologyAdvice/stardust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TechnologyAdvice/stardust/teams","hooks_url":"https://api.github.com/repos/TechnologyAdvice/stardust/hooks","issue_events_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/events{/number}","events_url":"https://api.github.com/repos/TechnologyAdvice/stardust/events","assignees_url":"https://api.github.com/repos/TechnologyAdvice/stardust/assignees{/user}","branches_url":"https://api.github.com/repos/TechnologyAdvice/stardust/branches{/branch}","tags_url":"https://api.github.com/repos/TechnologyAdvice/stardust/tags","blobs_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/refs{/sha}","trees_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TechnologyAdvice/stardust/statuses/{sha}","languages_url":"https://api.github.com/repos/TechnologyAdvice/stardust/languages","stargazers_url":"https://api.github.com/repos/TechnologyAdvice/stardust/stargazers","contributors_url":"https://api.github.com/repos/TechnologyAdvice/stardust/contributors","subscribers_url":"https://api.github.com/repos/TechnologyAdvice/stardust/subscribers","subscription_url":"https://api.github.com/repos/TechnologyAdvice/stardust/subscription","commits_url":"https://api.github.com/repos/TechnologyAdvice/stardust/commits{/sha}","git_commits_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/commits{/sha}","comments_url":"https://api.github.com/repos/TechnologyAdvice/stardust/comments{/number}","issue_comment_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/comments{/number}","contents_url":"https://api.github.com/repos/TechnologyAdvice/stardust/contents/{+path}","compare_url":"https://api.github.com/repos/TechnologyAdvice/stardust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TechnologyAdvice/stardust/merges","archive_url":"https://api.github.com/repos/TechnologyAdvice/stardust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TechnologyAdvice/stardust/downloads","issues_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues{/number}","pulls_url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls{/number}","milestones_url":"https://api.github.com/repos/TechnologyAdvice/stardust/milestones{/number}","notifications_url":"https://api.github.com/repos/TechnologyAdvice/stardust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TechnologyAdvice/stardust/labels{/name}","releases_url":"https://api.github.com/repos/TechnologyAdvice/stardust/releases{/id}","created_at":"2015-06-19T16:47:19Z","updated_at":"2015-12-20T18:15:34Z","pushed_at":"2015-12-29T18:00:53Z","git_url":"git://github.com/TechnologyAdvice/stardust.git","ssh_url":"git@github.com:TechnologyAdvice/stardust.git","clone_url":"https://github.com/TechnologyAdvice/stardust.git","svn_url":"https://github.com/TechnologyAdvice/stardust","homepage":"https://technologyadvice.github.io/stardust","size":2878,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":32,"default_branch":"master"}},"base":{"label":"TechnologyAdvice:master","ref":"master","sha":"598aa7e97db955bbf4f127c89d637b89200049ac","user":{"login":"TechnologyAdvice","id":6045188,"avatar_url":"https://avatars.githubusercontent.com/u/6045188?v=3","gravatar_id":"","url":"https://api.github.com/users/TechnologyAdvice","html_url":"https://github.com/TechnologyAdvice","followers_url":"https://api.github.com/users/TechnologyAdvice/followers","following_url":"https://api.github.com/users/TechnologyAdvice/following{/other_user}","gists_url":"https://api.github.com/users/TechnologyAdvice/gists{/gist_id}","starred_url":"https://api.github.com/users/TechnologyAdvice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechnologyAdvice/subscriptions","organizations_url":"https://api.github.com/users/TechnologyAdvice/orgs","repos_url":"https://api.github.com/users/TechnologyAdvice/repos","events_url":"https://api.github.com/users/TechnologyAdvice/events{/privacy}","received_events_url":"https://api.github.com/users/TechnologyAdvice/received_events","type":"Organization","site_admin":false},"repo":{"id":37734226,"name":"stardust","full_name":"TechnologyAdvice/stardust","owner":{"login":"TechnologyAdvice","id":6045188,"avatar_url":"https://avatars.githubusercontent.com/u/6045188?v=3","gravatar_id":"","url":"https://api.github.com/users/TechnologyAdvice","html_url":"https://github.com/TechnologyAdvice","followers_url":"https://api.github.com/users/TechnologyAdvice/followers","following_url":"https://api.github.com/users/TechnologyAdvice/following{/other_user}","gists_url":"https://api.github.com/users/TechnologyAdvice/gists{/gist_id}","starred_url":"https://api.github.com/users/TechnologyAdvice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechnologyAdvice/subscriptions","organizations_url":"https://api.github.com/users/TechnologyAdvice/orgs","repos_url":"https://api.github.com/users/TechnologyAdvice/repos","events_url":"https://api.github.com/users/TechnologyAdvice/events{/privacy}","received_events_url":"https://api.github.com/users/TechnologyAdvice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TechnologyAdvice/stardust","description":"React component library based on Semantic UI","fork":false,"url":"https://api.github.com/repos/TechnologyAdvice/stardust","forks_url":"https://api.github.com/repos/TechnologyAdvice/stardust/forks","keys_url":"https://api.github.com/repos/TechnologyAdvice/stardust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TechnologyAdvice/stardust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TechnologyAdvice/stardust/teams","hooks_url":"https://api.github.com/repos/TechnologyAdvice/stardust/hooks","issue_events_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/events{/number}","events_url":"https://api.github.com/repos/TechnologyAdvice/stardust/events","assignees_url":"https://api.github.com/repos/TechnologyAdvice/stardust/assignees{/user}","branches_url":"https://api.github.com/repos/TechnologyAdvice/stardust/branches{/branch}","tags_url":"https://api.github.com/repos/TechnologyAdvice/stardust/tags","blobs_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/refs{/sha}","trees_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TechnologyAdvice/stardust/statuses/{sha}","languages_url":"https://api.github.com/repos/TechnologyAdvice/stardust/languages","stargazers_url":"https://api.github.com/repos/TechnologyAdvice/stardust/stargazers","contributors_url":"https://api.github.com/repos/TechnologyAdvice/stardust/contributors","subscribers_url":"https://api.github.com/repos/TechnologyAdvice/stardust/subscribers","subscription_url":"https://api.github.com/repos/TechnologyAdvice/stardust/subscription","commits_url":"https://api.github.com/repos/TechnologyAdvice/stardust/commits{/sha}","git_commits_url":"https://api.github.com/repos/TechnologyAdvice/stardust/git/commits{/sha}","comments_url":"https://api.github.com/repos/TechnologyAdvice/stardust/comments{/number}","issue_comment_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/comments{/number}","contents_url":"https://api.github.com/repos/TechnologyAdvice/stardust/contents/{+path}","compare_url":"https://api.github.com/repos/TechnologyAdvice/stardust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TechnologyAdvice/stardust/merges","archive_url":"https://api.github.com/repos/TechnologyAdvice/stardust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TechnologyAdvice/stardust/downloads","issues_url":"https://api.github.com/repos/TechnologyAdvice/stardust/issues{/number}","pulls_url":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls{/number}","milestones_url":"https://api.github.com/repos/TechnologyAdvice/stardust/milestones{/number}","notifications_url":"https://api.github.com/repos/TechnologyAdvice/stardust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TechnologyAdvice/stardust/labels{/name}","releases_url":"https://api.github.com/repos/TechnologyAdvice/stardust/releases{/id}","created_at":"2015-06-19T16:47:19Z","updated_at":"2015-12-20T18:15:34Z","pushed_at":"2015-12-29T18:00:53Z","git_url":"git://github.com/TechnologyAdvice/stardust.git","ssh_url":"git@github.com:TechnologyAdvice/stardust.git","clone_url":"https://github.com/TechnologyAdvice/stardust.git","svn_url":"https://github.com/TechnologyAdvice/stardust","homepage":"https://technologyadvice.github.io/stardust","size":2878,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141"},"html":{"href":"https://github.com/TechnologyAdvice/stardust/pull/141"},"issue":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/141"},"comments":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/TechnologyAdvice/stardust/statuses/f36155afffe4cf3becc55c4245e33ccc746727da"}}}}