{"action":"created","comment":{"url":"https://api.github.com/repos/ramda/ramda/pulls/comments/34179423","id":34179423,"diff_hunk":"@@ -0,0 +1,28 @@\n+var _curry3 = require('./internal/_curry3');\n+var is = require('./is');\n+var propSatisfies = require('./propSatisfies');\n+\n+\n+/**\n+ * Returns `true` if the specified object property is of the given type;\n+ * `false` otherwise.\n+ *\n+ * @func\n+ * @memberOf R\n+ * @category Type\n+ * @sig Type -> String -> Object -> Boolean\n+ * @param {Function} type\n+ * @param {String} name\n+ * @param {*} obj\n+ * @return {Boolean}\n+ * @see R.is\n+ * @see R.propSatisfies\n+ * @example\n+ *\n+ *      R.propIs('x', Number, {x: 1, y: 2});  //=> true\n+ *      R.propIs('x', Number, {x: 'foo'});    //=> false\n+ *      R.propIs('x', Number, {});            //=> false\n+ */\n+module.exports = _curry3(function propIs(type, name, obj) {\n+  return propSatisfies(is(type), name, obj);\n+});","path":"src/propIs.js","position":28,"original_position":28,"commit_id":"92e1c375dd263e97e1a27cd2f8cc280517422fdc","original_commit_id":"92e1c375dd263e97e1a27cd2f8cc280517422fdc","user":{"login":"CrossEye","id":151263,"avatar_url":"https://avatars.githubusercontent.com/u/151263?v=3","gravatar_id":"","url":"https://api.github.com/users/CrossEye","html_url":"https://github.com/CrossEye","followers_url":"https://api.github.com/users/CrossEye/followers","following_url":"https://api.github.com/users/CrossEye/following{/other_user}","gists_url":"https://api.github.com/users/CrossEye/gists{/gist_id}","starred_url":"https://api.github.com/users/CrossEye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrossEye/subscriptions","organizations_url":"https://api.github.com/users/CrossEye/orgs","repos_url":"https://api.github.com/users/CrossEye/repos","events_url":"https://api.github.com/users/CrossEye/events{/privacy}","received_events_url":"https://api.github.com/users/CrossEye/received_events","type":"User","site_admin":false},"body":"Actually, there's a lot to be said for that.  If we could just convince that recalcitrant so-and-so to give up his concerns about functions that don't report their arity correctly, then we could accomplish this in a pretty straightforward manner.  But there's a huge wrinkle.  How do we know how many parameters each intermediate function should consume?  If we can insist that it's just one, then this could be straightforward.\r\n\r\nIt dovetails a bit with that [gist][bu] created, although of course it's still for multiple functions, not just two.\r\n\r\nAnd we could do away with that pesky `useWith` altogether!\r\n\r\n  [bu]: https://gist.github.com/buzzdecafe/b00905f6487725173ff7","created_at":"2015-07-08T18:09:48Z","updated_at":"2015-07-08T18:09:48Z","html_url":"https://github.com/ramda/ramda/pull/1243#discussion_r34179423","pull_request_url":"https://api.github.com/repos/ramda/ramda/pulls/1243","_links":{"self":{"href":"https://api.github.com/repos/ramda/ramda/pulls/comments/34179423"},"html":{"href":"https://github.com/ramda/ramda/pull/1243#discussion_r34179423"},"pull_request":{"href":"https://api.github.com/repos/ramda/ramda/pulls/1243"}}},"pull_request":{"url":"https://api.github.com/repos/ramda/ramda/pulls/1243","id":39229684,"html_url":"https://github.com/ramda/ramda/pull/1243","diff_url":"https://github.com/ramda/ramda/pull/1243.diff","patch_url":"https://github.com/ramda/ramda/pull/1243.patch","issue_url":"https://api.github.com/repos/ramda/ramda/issues/1243","number":1243,"state":"open","locked":false,"title":"add R.propIs and R.propSatisfies","user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"body":"In #1241, @bySabi defined this function:\r\n\r\n```javascript\r\nR.compose(R.is(String), R.prop('type'))\r\n```\r\n\r\nIn JavaScript it's (sadly) quite common to need to check a property's type. I suggest it's at least as common as checking a property's value. `R.propEq` gives us a convenient way to check a property's value. `R.propIs` would give us a convenient way to check a property's type. The code above could then be rewritten as:\r\n\r\n```javascript\r\nR.propIs('type', String)\r\n```\r\n\r\n`R.propIs(a, b, c)` will throw a TypeError if `c` is null/undefined, as we'll attempt `c[a]`. This may or may not be optimal, but it matches the current behaviour of `R.propEq`.\r\n\r\n---\r\n\r\n__2015-07-08 update__\r\n\r\nI've added `R.propSatisfies` and changed the signatures of `R.propEq` and `R.propIs`.\r\n\r\n```haskell\r\nR.propEq        :: a -> String -> Object -> Boolean\r\nR.propIs        :: Type -> String -> Object -> Boolean\r\nR.propSatisfies :: (a -> Boolean) -> String -> {String: a} -> Boolean\r\n```\r\n\r\nThe change to `R.propEq` is breaking so will warrant a `:warning:` in the 0.16.0 upgrade guide.\r\n","created_at":"2015-07-06T00:33:47Z","updated_at":"2015-07-08T18:09:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfbced66db87341196ca9da1aac8462b9d93a12c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ramda/ramda/pulls/1243/commits","review_comments_url":"https://api.github.com/repos/ramda/ramda/pulls/1243/comments","review_comment_url":"https://api.github.com/repos/ramda/ramda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ramda/ramda/issues/1243/comments","statuses_url":"https://api.github.com/repos/ramda/ramda/statuses/92e1c375dd263e97e1a27cd2f8cc280517422fdc","head":{"label":"davidchambers:prop-is","ref":"prop-is","sha":"92e1c375dd263e97e1a27cd2f8cc280517422fdc","user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"repo":{"id":22492045,"name":"ramda","full_name":"davidchambers/ramda","owner":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidchambers/ramda","description":"","fork":true,"url":"https://api.github.com/repos/davidchambers/ramda","forks_url":"https://api.github.com/repos/davidchambers/ramda/forks","keys_url":"https://api.github.com/repos/davidchambers/ramda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidchambers/ramda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidchambers/ramda/teams","hooks_url":"https://api.github.com/repos/davidchambers/ramda/hooks","issue_events_url":"https://api.github.com/repos/davidchambers/ramda/issues/events{/number}","events_url":"https://api.github.com/repos/davidchambers/ramda/events","assignees_url":"https://api.github.com/repos/davidchambers/ramda/assignees{/user}","branches_url":"https://api.github.com/repos/davidchambers/ramda/branches{/branch}","tags_url":"https://api.github.com/repos/davidchambers/ramda/tags","blobs_url":"https://api.github.com/repos/davidchambers/ramda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidchambers/ramda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidchambers/ramda/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidchambers/ramda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidchambers/ramda/statuses/{sha}","languages_url":"https://api.github.com/repos/davidchambers/ramda/languages","stargazers_url":"https://api.github.com/repos/davidchambers/ramda/stargazers","contributors_url":"https://api.github.com/repos/davidchambers/ramda/contributors","subscribers_url":"https://api.github.com/repos/davidchambers/ramda/subscribers","subscription_url":"https://api.github.com/repos/davidchambers/ramda/subscription","commits_url":"https://api.github.com/repos/davidchambers/ramda/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidchambers/ramda/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidchambers/ramda/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidchambers/ramda/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidchambers/ramda/contents/{+path}","compare_url":"https://api.github.com/repos/davidchambers/ramda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidchambers/ramda/merges","archive_url":"https://api.github.com/repos/davidchambers/ramda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidchambers/ramda/downloads","issues_url":"https://api.github.com/repos/davidchambers/ramda/issues{/number}","pulls_url":"https://api.github.com/repos/davidchambers/ramda/pulls{/number}","milestones_url":"https://api.github.com/repos/davidchambers/ramda/milestones{/number}","notifications_url":"https://api.github.com/repos/davidchambers/ramda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidchambers/ramda/labels{/name}","releases_url":"https://api.github.com/repos/davidchambers/ramda/releases{/id}","created_at":"2014-08-01T01:56:04Z","updated_at":"2015-04-24T05:09:49Z","pushed_at":"2015-07-08T16:34:35Z","git_url":"git://github.com/davidchambers/ramda.git","ssh_url":"git@github.com:davidchambers/ramda.git","clone_url":"https://github.com/davidchambers/ramda.git","svn_url":"https://github.com/davidchambers/ramda","homepage":null,"size":6897,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ramda:master","ref":"master","sha":"a170e8e9355b2d9e0157ba549bc2b20fbe9bc985","user":{"login":"ramda","id":5298359,"avatar_url":"https://avatars.githubusercontent.com/u/5298359?v=3","gravatar_id":"","url":"https://api.github.com/users/ramda","html_url":"https://github.com/ramda","followers_url":"https://api.github.com/users/ramda/followers","following_url":"https://api.github.com/users/ramda/following{/other_user}","gists_url":"https://api.github.com/users/ramda/gists{/gist_id}","starred_url":"https://api.github.com/users/ramda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramda/subscriptions","organizations_url":"https://api.github.com/users/ramda/orgs","repos_url":"https://api.github.com/users/ramda/repos","events_url":"https://api.github.com/users/ramda/events{/privacy}","received_events_url":"https://api.github.com/users/ramda/received_events","type":"Organization","site_admin":false},"repo":{"id":10851820,"name":"ramda","full_name":"ramda/ramda","owner":{"login":"ramda","id":5298359,"avatar_url":"https://avatars.githubusercontent.com/u/5298359?v=3","gravatar_id":"","url":"https://api.github.com/users/ramda","html_url":"https://github.com/ramda","followers_url":"https://api.github.com/users/ramda/followers","following_url":"https://api.github.com/users/ramda/following{/other_user}","gists_url":"https://api.github.com/users/ramda/gists{/gist_id}","starred_url":"https://api.github.com/users/ramda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramda/subscriptions","organizations_url":"https://api.github.com/users/ramda/orgs","repos_url":"https://api.github.com/users/ramda/repos","events_url":"https://api.github.com/users/ramda/events{/privacy}","received_events_url":"https://api.github.com/users/ramda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ramda/ramda","description":":ram: Practical functional Javascript","fork":false,"url":"https://api.github.com/repos/ramda/ramda","forks_url":"https://api.github.com/repos/ramda/ramda/forks","keys_url":"https://api.github.com/repos/ramda/ramda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramda/ramda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramda/ramda/teams","hooks_url":"https://api.github.com/repos/ramda/ramda/hooks","issue_events_url":"https://api.github.com/repos/ramda/ramda/issues/events{/number}","events_url":"https://api.github.com/repos/ramda/ramda/events","assignees_url":"https://api.github.com/repos/ramda/ramda/assignees{/user}","branches_url":"https://api.github.com/repos/ramda/ramda/branches{/branch}","tags_url":"https://api.github.com/repos/ramda/ramda/tags","blobs_url":"https://api.github.com/repos/ramda/ramda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramda/ramda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramda/ramda/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramda/ramda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramda/ramda/statuses/{sha}","languages_url":"https://api.github.com/repos/ramda/ramda/languages","stargazers_url":"https://api.github.com/repos/ramda/ramda/stargazers","contributors_url":"https://api.github.com/repos/ramda/ramda/contributors","subscribers_url":"https://api.github.com/repos/ramda/ramda/subscribers","subscription_url":"https://api.github.com/repos/ramda/ramda/subscription","commits_url":"https://api.github.com/repos/ramda/ramda/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramda/ramda/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramda/ramda/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramda/ramda/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramda/ramda/contents/{+path}","compare_url":"https://api.github.com/repos/ramda/ramda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramda/ramda/merges","archive_url":"https://api.github.com/repos/ramda/ramda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramda/ramda/downloads","issues_url":"https://api.github.com/repos/ramda/ramda/issues{/number}","pulls_url":"https://api.github.com/repos/ramda/ramda/pulls{/number}","milestones_url":"https://api.github.com/repos/ramda/ramda/milestones{/number}","notifications_url":"https://api.github.com/repos/ramda/ramda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramda/ramda/labels{/name}","releases_url":"https://api.github.com/repos/ramda/ramda/releases{/id}","created_at":"2013-06-21T20:32:35Z","updated_at":"2015-07-08T17:38:13Z","pushed_at":"2015-07-08T17:47:40Z","git_url":"git://github.com/ramda/ramda.git","ssh_url":"git@github.com:ramda/ramda.git","clone_url":"https://github.com/ramda/ramda.git","svn_url":"https://github.com/ramda/ramda","homepage":"http://ramdajs.com","size":10758,"stargazers_count":2317,"watchers_count":2317,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":182,"mirror_url":null,"open_issues_count":58,"forks":182,"open_issues":58,"watchers":2317,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ramda/ramda/pulls/1243"},"html":{"href":"https://github.com/ramda/ramda/pull/1243"},"issue":{"href":"https://api.github.com/repos/ramda/ramda/issues/1243"},"comments":{"href":"https://api.github.com/repos/ramda/ramda/issues/1243/comments"},"review_comments":{"href":"https://api.github.com/repos/ramda/ramda/pulls/1243/comments"},"review_comment":{"href":"https://api.github.com/repos/ramda/ramda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ramda/ramda/pulls/1243/commits"},"statuses":{"href":"https://api.github.com/repos/ramda/ramda/statuses/92e1c375dd263e97e1a27cd2f8cc280517422fdc"}}}}