{"action":"opened","number":212,"pull_request":{"url":"https://api.github.com/repos/node-schedule/node-schedule/pulls/212","id":50450686,"html_url":"https://github.com/node-schedule/node-schedule/pull/212","diff_url":"https://github.com/node-schedule/node-schedule/pull/212.diff","patch_url":"https://github.com/node-schedule/node-schedule/pull/212.patch","issue_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/212","number":212,"state":"open","locked":false,"title":"Add support for job functions with bound scope","user":{"login":"bastuijnman","id":851354,"avatar_url":"https://avatars.githubusercontent.com/u/851354?v=3","gravatar_id":"","url":"https://api.github.com/users/bastuijnman","html_url":"https://github.com/bastuijnman","followers_url":"https://api.github.com/users/bastuijnman/followers","following_url":"https://api.github.com/users/bastuijnman/following{/other_user}","gists_url":"https://api.github.com/users/bastuijnman/gists{/gist_id}","starred_url":"https://api.github.com/users/bastuijnman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bastuijnman/subscriptions","organizations_url":"https://api.github.com/users/bastuijnman/orgs","repos_url":"https://api.github.com/users/bastuijnman/repos","events_url":"https://api.github.com/users/bastuijnman/events{/privacy}","received_events_url":"https://api.github.com/users/bastuijnman/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nI ran into a problem today while trying to use the library with bound job functions. \r\n\r\nAs per the ECMAScript 5.1 standard when using `Function.prototype.bind` the resulting function does not get a prototype and thus the library will fail when trying to check if the function is a generator (which it does by checking the prototype).\r\n\r\nThis code would fail:\r\n```\r\nvar scheduler = require('node-schedule');\r\nscheduler.scheduleJob('* * * * *', function () {\r\n    // do something with this\r\n}.bind(myObject));\r\n```\r\n\r\nI've added a test case which failed in the old situation and passes in the new one, where an extra check is added to check for the prototype itself.\r\n\r\nKind regards,\r\n\r\nBas Tuijnman","created_at":"2015-11-11T23:15:56Z","updated_at":"2015-11-11T23:15:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/node-schedule/node-schedule/pulls/212/commits","review_comments_url":"https://api.github.com/repos/node-schedule/node-schedule/pulls/212/comments","review_comment_url":"https://api.github.com/repos/node-schedule/node-schedule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/212/comments","statuses_url":"https://api.github.com/repos/node-schedule/node-schedule/statuses/9575a14c3ced6565d7f16727740c55024bfdcd14","head":{"label":"bastuijnman:feature/fix-bound-job-function","ref":"feature/fix-bound-job-function","sha":"9575a14c3ced6565d7f16727740c55024bfdcd14","user":{"login":"bastuijnman","id":851354,"avatar_url":"https://avatars.githubusercontent.com/u/851354?v=3","gravatar_id":"","url":"https://api.github.com/users/bastuijnman","html_url":"https://github.com/bastuijnman","followers_url":"https://api.github.com/users/bastuijnman/followers","following_url":"https://api.github.com/users/bastuijnman/following{/other_user}","gists_url":"https://api.github.com/users/bastuijnman/gists{/gist_id}","starred_url":"https://api.github.com/users/bastuijnman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bastuijnman/subscriptions","organizations_url":"https://api.github.com/users/bastuijnman/orgs","repos_url":"https://api.github.com/users/bastuijnman/repos","events_url":"https://api.github.com/users/bastuijnman/events{/privacy}","received_events_url":"https://api.github.com/users/bastuijnman/received_events","type":"User","site_admin":false},"repo":{"id":46015514,"name":"node-schedule","full_name":"bastuijnman/node-schedule","owner":{"login":"bastuijnman","id":851354,"avatar_url":"https://avatars.githubusercontent.com/u/851354?v=3","gravatar_id":"","url":"https://api.github.com/users/bastuijnman","html_url":"https://github.com/bastuijnman","followers_url":"https://api.github.com/users/bastuijnman/followers","following_url":"https://api.github.com/users/bastuijnman/following{/other_user}","gists_url":"https://api.github.com/users/bastuijnman/gists{/gist_id}","starred_url":"https://api.github.com/users/bastuijnman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bastuijnman/subscriptions","organizations_url":"https://api.github.com/users/bastuijnman/orgs","repos_url":"https://api.github.com/users/bastuijnman/repos","events_url":"https://api.github.com/users/bastuijnman/events{/privacy}","received_events_url":"https://api.github.com/users/bastuijnman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bastuijnman/node-schedule","description":"A cron-like and not-cron-like job scheduler for Node.","fork":true,"url":"https://api.github.com/repos/bastuijnman/node-schedule","forks_url":"https://api.github.com/repos/bastuijnman/node-schedule/forks","keys_url":"https://api.github.com/repos/bastuijnman/node-schedule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bastuijnman/node-schedule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bastuijnman/node-schedule/teams","hooks_url":"https://api.github.com/repos/bastuijnman/node-schedule/hooks","issue_events_url":"https://api.github.com/repos/bastuijnman/node-schedule/issues/events{/number}","events_url":"https://api.github.com/repos/bastuijnman/node-schedule/events","assignees_url":"https://api.github.com/repos/bastuijnman/node-schedule/assignees{/user}","branches_url":"https://api.github.com/repos/bastuijnman/node-schedule/branches{/branch}","tags_url":"https://api.github.com/repos/bastuijnman/node-schedule/tags","blobs_url":"https://api.github.com/repos/bastuijnman/node-schedule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bastuijnman/node-schedule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bastuijnman/node-schedule/git/refs{/sha}","trees_url":"https://api.github.com/repos/bastuijnman/node-schedule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bastuijnman/node-schedule/statuses/{sha}","languages_url":"https://api.github.com/repos/bastuijnman/node-schedule/languages","stargazers_url":"https://api.github.com/repos/bastuijnman/node-schedule/stargazers","contributors_url":"https://api.github.com/repos/bastuijnman/node-schedule/contributors","subscribers_url":"https://api.github.com/repos/bastuijnman/node-schedule/subscribers","subscription_url":"https://api.github.com/repos/bastuijnman/node-schedule/subscription","commits_url":"https://api.github.com/repos/bastuijnman/node-schedule/commits{/sha}","git_commits_url":"https://api.github.com/repos/bastuijnman/node-schedule/git/commits{/sha}","comments_url":"https://api.github.com/repos/bastuijnman/node-schedule/comments{/number}","issue_comment_url":"https://api.github.com/repos/bastuijnman/node-schedule/issues/comments{/number}","contents_url":"https://api.github.com/repos/bastuijnman/node-schedule/contents/{+path}","compare_url":"https://api.github.com/repos/bastuijnman/node-schedule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bastuijnman/node-schedule/merges","archive_url":"https://api.github.com/repos/bastuijnman/node-schedule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bastuijnman/node-schedule/downloads","issues_url":"https://api.github.com/repos/bastuijnman/node-schedule/issues{/number}","pulls_url":"https://api.github.com/repos/bastuijnman/node-schedule/pulls{/number}","milestones_url":"https://api.github.com/repos/bastuijnman/node-schedule/milestones{/number}","notifications_url":"https://api.github.com/repos/bastuijnman/node-schedule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bastuijnman/node-schedule/labels{/name}","releases_url":"https://api.github.com/repos/bastuijnman/node-schedule/releases{/id}","created_at":"2015-11-11T23:02:22Z","updated_at":"2015-11-11T23:02:23Z","pushed_at":"2015-11-11T23:10:53Z","git_url":"git://github.com/bastuijnman/node-schedule.git","ssh_url":"git@github.com:bastuijnman/node-schedule.git","clone_url":"https://github.com/bastuijnman/node-schedule.git","svn_url":"https://github.com/bastuijnman/node-schedule","homepage":"","size":1165,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"node-schedule:master","ref":"master","sha":"4c1970c59aaba20c4215ceb9dae5f0482723cd20","user":{"login":"node-schedule","id":15573747,"avatar_url":"https://avatars.githubusercontent.com/u/15573747?v=3","gravatar_id":"","url":"https://api.github.com/users/node-schedule","html_url":"https://github.com/node-schedule","followers_url":"https://api.github.com/users/node-schedule/followers","following_url":"https://api.github.com/users/node-schedule/following{/other_user}","gists_url":"https://api.github.com/users/node-schedule/gists{/gist_id}","starred_url":"https://api.github.com/users/node-schedule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-schedule/subscriptions","organizations_url":"https://api.github.com/users/node-schedule/orgs","repos_url":"https://api.github.com/users/node-schedule/repos","events_url":"https://api.github.com/users/node-schedule/events{/privacy}","received_events_url":"https://api.github.com/users/node-schedule/received_events","type":"Organization","site_admin":false},"repo":{"id":1735515,"name":"node-schedule","full_name":"node-schedule/node-schedule","owner":{"login":"node-schedule","id":15573747,"avatar_url":"https://avatars.githubusercontent.com/u/15573747?v=3","gravatar_id":"","url":"https://api.github.com/users/node-schedule","html_url":"https://github.com/node-schedule","followers_url":"https://api.github.com/users/node-schedule/followers","following_url":"https://api.github.com/users/node-schedule/following{/other_user}","gists_url":"https://api.github.com/users/node-schedule/gists{/gist_id}","starred_url":"https://api.github.com/users/node-schedule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-schedule/subscriptions","organizations_url":"https://api.github.com/users/node-schedule/orgs","repos_url":"https://api.github.com/users/node-schedule/repos","events_url":"https://api.github.com/users/node-schedule/events{/privacy}","received_events_url":"https://api.github.com/users/node-schedule/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/node-schedule/node-schedule","description":"A cron-like and not-cron-like job scheduler for Node.","fork":false,"url":"https://api.github.com/repos/node-schedule/node-schedule","forks_url":"https://api.github.com/repos/node-schedule/node-schedule/forks","keys_url":"https://api.github.com/repos/node-schedule/node-schedule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/node-schedule/node-schedule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/node-schedule/node-schedule/teams","hooks_url":"https://api.github.com/repos/node-schedule/node-schedule/hooks","issue_events_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/events{/number}","events_url":"https://api.github.com/repos/node-schedule/node-schedule/events","assignees_url":"https://api.github.com/repos/node-schedule/node-schedule/assignees{/user}","branches_url":"https://api.github.com/repos/node-schedule/node-schedule/branches{/branch}","tags_url":"https://api.github.com/repos/node-schedule/node-schedule/tags","blobs_url":"https://api.github.com/repos/node-schedule/node-schedule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/node-schedule/node-schedule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/node-schedule/node-schedule/git/refs{/sha}","trees_url":"https://api.github.com/repos/node-schedule/node-schedule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/node-schedule/node-schedule/statuses/{sha}","languages_url":"https://api.github.com/repos/node-schedule/node-schedule/languages","stargazers_url":"https://api.github.com/repos/node-schedule/node-schedule/stargazers","contributors_url":"https://api.github.com/repos/node-schedule/node-schedule/contributors","subscribers_url":"https://api.github.com/repos/node-schedule/node-schedule/subscribers","subscription_url":"https://api.github.com/repos/node-schedule/node-schedule/subscription","commits_url":"https://api.github.com/repos/node-schedule/node-schedule/commits{/sha}","git_commits_url":"https://api.github.com/repos/node-schedule/node-schedule/git/commits{/sha}","comments_url":"https://api.github.com/repos/node-schedule/node-schedule/comments{/number}","issue_comment_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/comments{/number}","contents_url":"https://api.github.com/repos/node-schedule/node-schedule/contents/{+path}","compare_url":"https://api.github.com/repos/node-schedule/node-schedule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/node-schedule/node-schedule/merges","archive_url":"https://api.github.com/repos/node-schedule/node-schedule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/node-schedule/node-schedule/downloads","issues_url":"https://api.github.com/repos/node-schedule/node-schedule/issues{/number}","pulls_url":"https://api.github.com/repos/node-schedule/node-schedule/pulls{/number}","milestones_url":"https://api.github.com/repos/node-schedule/node-schedule/milestones{/number}","notifications_url":"https://api.github.com/repos/node-schedule/node-schedule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/node-schedule/node-schedule/labels{/name}","releases_url":"https://api.github.com/repos/node-schedule/node-schedule/releases{/id}","created_at":"2011-05-11T21:41:34Z","updated_at":"2015-11-11T13:27:24Z","pushed_at":"2015-11-11T08:39:23Z","git_url":"git://github.com/node-schedule/node-schedule.git","ssh_url":"git@github.com:node-schedule/node-schedule.git","clone_url":"https://github.com/node-schedule/node-schedule.git","svn_url":"https://github.com/node-schedule/node-schedule","homepage":"","size":1165,"stargazers_count":1675,"watchers_count":1675,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":20,"forks":120,"open_issues":20,"watchers":1675,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/node-schedule/node-schedule/pulls/212"},"html":{"href":"https://github.com/node-schedule/node-schedule/pull/212"},"issue":{"href":"https://api.github.com/repos/node-schedule/node-schedule/issues/212"},"comments":{"href":"https://api.github.com/repos/node-schedule/node-schedule/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/node-schedule/node-schedule/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/node-schedule/node-schedule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/node-schedule/node-schedule/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/node-schedule/node-schedule/statuses/9575a14c3ced6565d7f16727740c55024bfdcd14"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":15,"deletions":1,"changed_files":2}}