{"action":"created","issue":{"url":"https://api.github.com/repos/neumino/thinky/issues/382","labels_url":"https://api.github.com/repos/neumino/thinky/issues/382/labels{/name}","comments_url":"https://api.github.com/repos/neumino/thinky/issues/382/comments","events_url":"https://api.github.com/repos/neumino/thinky/issues/382/events","html_url":"https://github.com/neumino/thinky/pull/382","id":115681733,"number":382,"title":"add Query.prototype.bind()","user":{"login":"ondreian","id":1090434,"avatar_url":"https://avatars.githubusercontent.com/u/1090434?v=3","gravatar_id":"","url":"https://api.github.com/users/ondreian","html_url":"https://github.com/ondreian","followers_url":"https://api.github.com/users/ondreian/followers","following_url":"https://api.github.com/users/ondreian/following{/other_user}","gists_url":"https://api.github.com/users/ondreian/gists{/gist_id}","starred_url":"https://api.github.com/users/ondreian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondreian/subscriptions","organizations_url":"https://api.github.com/users/ondreian/orgs","repos_url":"https://api.github.com/users/ondreian/repos","events_url":"https://api.github.com/users/ondreian/events{/privacy}","received_events_url":"https://api.github.com/users/ondreian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-07T18:03:10Z","updated_at":"2015-11-09T16:21:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neumino/thinky/pulls/382","html_url":"https://github.com/neumino/thinky/pull/382","diff_url":"https://github.com/neumino/thinky/pull/382.diff","patch_url":"https://github.com/neumino/thinky/pull/382.patch"},"body":"I often find that when I am using Thinky with some sort of functional library in a computational chain, one of two things happens.\r\n\r\nI end up with a lot of models looking like this:\r\n```js\r\nvar User = thinky.createModel(\"User\", {\r\n    id: type.number(),\r\n    age: type.number(),\r\n    admin: type.boolean().default(false)\r\n});\r\n\r\nUser.defineStatic('bind', function() {\r\n  return this.run.bind(this);\r\n});\r\n```\r\n\r\nOr I end up creating some extraneous lines of code:\r\n\r\n```js\r\nquery = User.find(req.params.id);\r\nboundQuery = query.run.bind(query);\r\n```\r\n\r\nIt seemed like a useful addition to make thinky play more nicely with functional libraries that handle promises (like Ramda.js for instance)."},"comment":{"url":"https://api.github.com/repos/neumino/thinky/issues/comments/155112678","html_url":"https://github.com/neumino/thinky/pull/382#issuecomment-155112678","issue_url":"https://api.github.com/repos/neumino/thinky/issues/382","id":155112678,"user":{"login":"neumino","id":1461947,"avatar_url":"https://avatars.githubusercontent.com/u/1461947?v=3","gravatar_id":"","url":"https://api.github.com/users/neumino","html_url":"https://github.com/neumino","followers_url":"https://api.github.com/users/neumino/followers","following_url":"https://api.github.com/users/neumino/following{/other_user}","gists_url":"https://api.github.com/users/neumino/gists{/gist_id}","starred_url":"https://api.github.com/users/neumino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neumino/subscriptions","organizations_url":"https://api.github.com/users/neumino/orgs","repos_url":"https://api.github.com/users/neumino/repos","events_url":"https://api.github.com/users/neumino/events{/privacy}","received_events_url":"https://api.github.com/users/neumino/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T16:21:25Z","updated_at":"2015-11-09T16:21:25Z","body":"My bad, I misread again -_-\r\n\r\nIn this case can you just rename `bind` to `bindRun`? `boundRun`? I don't have strong opinions on the name as long as it's not just `bind`.\r\n\r\nThanks for the PR!"}}