{"action":"opened","number":26,"pull_request":{"url":"https://api.github.com/repos/niksy/throttle-debounce/pulls/26","id":225944613,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1OTQ0NjEz","html_url":"https://github.com/niksy/throttle-debounce/pull/26","diff_url":"https://github.com/niksy/throttle-debounce/pull/26.diff","patch_url":"https://github.com/niksy/throttle-debounce/pull/26.patch","issue_url":"https://api.github.com/repos/niksy/throttle-debounce/issues/26","number":26,"state":"open","locked":false,"title":"Cancelling.","user":{"login":"whatknight","id":1613523,"node_id":"MDQ6VXNlcjE2MTM1MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/1613523?v=4","gravatar_id":"","url":"https://api.github.com/users/whatknight","html_url":"https://github.com/whatknight","followers_url":"https://api.github.com/users/whatknight/followers","following_url":"https://api.github.com/users/whatknight/following{/other_user}","gists_url":"https://api.github.com/users/whatknight/gists{/gist_id}","starred_url":"https://api.github.com/users/whatknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatknight/subscriptions","organizations_url":"https://api.github.com/users/whatknight/orgs","repos_url":"https://api.github.com/users/whatknight/repos","events_url":"https://api.github.com/users/whatknight/events{/privacy}","received_events_url":"https://api.github.com/users/whatknight/received_events","type":"User","site_admin":false},"body":"Addresses https://github.com/niksy/throttle-debounce/issues/6.\r\n\r\nI started this a few days ago but I see there's already kind of an implementation in the time it took me to create this one. I figured I might as well open the PR for at least some discussion. \r\n\r\nI think this impl may be a little more thorough since after cancelling the the callback function will not be called again regardless of whether or not it was going to be executed in a timeout or synchronously. \r\n\r\nThis also moves the documentation to the Usage section and provides an example.","created_at":"2018-10-26T00:36:16Z","updated_at":"2018-10-26T00:36:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/niksy/throttle-debounce/pulls/26/commits","review_comments_url":"https://api.github.com/repos/niksy/throttle-debounce/pulls/26/comments","review_comment_url":"https://api.github.com/repos/niksy/throttle-debounce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/niksy/throttle-debounce/issues/26/comments","statuses_url":"https://api.github.com/repos/niksy/throttle-debounce/statuses/4ed5bd14c18f77ef222bddb6cbf64e6a5f1423b1","head":{"label":"whatknight:cancelling","ref":"cancelling","sha":"4ed5bd14c18f77ef222bddb6cbf64e6a5f1423b1","user":{"login":"whatknight","id":1613523,"node_id":"MDQ6VXNlcjE2MTM1MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/1613523?v=4","gravatar_id":"","url":"https://api.github.com/users/whatknight","html_url":"https://github.com/whatknight","followers_url":"https://api.github.com/users/whatknight/followers","following_url":"https://api.github.com/users/whatknight/following{/other_user}","gists_url":"https://api.github.com/users/whatknight/gists{/gist_id}","starred_url":"https://api.github.com/users/whatknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatknight/subscriptions","organizations_url":"https://api.github.com/users/whatknight/orgs","repos_url":"https://api.github.com/users/whatknight/repos","events_url":"https://api.github.com/users/whatknight/events{/privacy}","received_events_url":"https://api.github.com/users/whatknight/received_events","type":"User","site_admin":false},"repo":{"id":154349413,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQzNDk0MTM=","name":"throttle-debounce","full_name":"whatknight/throttle-debounce","private":false,"owner":{"login":"whatknight","id":1613523,"node_id":"MDQ6VXNlcjE2MTM1MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/1613523?v=4","gravatar_id":"","url":"https://api.github.com/users/whatknight","html_url":"https://github.com/whatknight","followers_url":"https://api.github.com/users/whatknight/followers","following_url":"https://api.github.com/users/whatknight/following{/other_user}","gists_url":"https://api.github.com/users/whatknight/gists{/gist_id}","starred_url":"https://api.github.com/users/whatknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatknight/subscriptions","organizations_url":"https://api.github.com/users/whatknight/orgs","repos_url":"https://api.github.com/users/whatknight/repos","events_url":"https://api.github.com/users/whatknight/events{/privacy}","received_events_url":"https://api.github.com/users/whatknight/received_events","type":"User","site_admin":false},"html_url":"https://github.com/whatknight/throttle-debounce","description":"Throttle and debounce functions.","fork":true,"url":"https://api.github.com/repos/whatknight/throttle-debounce","forks_url":"https://api.github.com/repos/whatknight/throttle-debounce/forks","keys_url":"https://api.github.com/repos/whatknight/throttle-debounce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatknight/throttle-debounce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatknight/throttle-debounce/teams","hooks_url":"https://api.github.com/repos/whatknight/throttle-debounce/hooks","issue_events_url":"https://api.github.com/repos/whatknight/throttle-debounce/issues/events{/number}","events_url":"https://api.github.com/repos/whatknight/throttle-debounce/events","assignees_url":"https://api.github.com/repos/whatknight/throttle-debounce/assignees{/user}","branches_url":"https://api.github.com/repos/whatknight/throttle-debounce/branches{/branch}","tags_url":"https://api.github.com/repos/whatknight/throttle-debounce/tags","blobs_url":"https://api.github.com/repos/whatknight/throttle-debounce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatknight/throttle-debounce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatknight/throttle-debounce/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatknight/throttle-debounce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatknight/throttle-debounce/statuses/{sha}","languages_url":"https://api.github.com/repos/whatknight/throttle-debounce/languages","stargazers_url":"https://api.github.com/repos/whatknight/throttle-debounce/stargazers","contributors_url":"https://api.github.com/repos/whatknight/throttle-debounce/contributors","subscribers_url":"https://api.github.com/repos/whatknight/throttle-debounce/subscribers","subscription_url":"https://api.github.com/repos/whatknight/throttle-debounce/subscription","commits_url":"https://api.github.com/repos/whatknight/throttle-debounce/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatknight/throttle-debounce/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatknight/throttle-debounce/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatknight/throttle-debounce/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatknight/throttle-debounce/contents/{+path}","compare_url":"https://api.github.com/repos/whatknight/throttle-debounce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatknight/throttle-debounce/merges","archive_url":"https://api.github.com/repos/whatknight/throttle-debounce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatknight/throttle-debounce/downloads","issues_url":"https://api.github.com/repos/whatknight/throttle-debounce/issues{/number}","pulls_url":"https://api.github.com/repos/whatknight/throttle-debounce/pulls{/number}","milestones_url":"https://api.github.com/repos/whatknight/throttle-debounce/milestones{/number}","notifications_url":"https://api.github.com/repos/whatknight/throttle-debounce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatknight/throttle-debounce/labels{/name}","releases_url":"https://api.github.com/repos/whatknight/throttle-debounce/releases{/id}","deployments_url":"https://api.github.com/repos/whatknight/throttle-debounce/deployments","created_at":"2018-10-23T15:09:22Z","updated_at":"2018-10-23T15:09:25Z","pushed_at":"2018-10-26T00:32:23Z","git_url":"git://github.com/whatknight/throttle-debounce.git","ssh_url":"git@github.com:whatknight/throttle-debounce.git","clone_url":"https://github.com/whatknight/throttle-debounce.git","svn_url":"https://github.com/whatknight/throttle-debounce","homepage":"","size":32,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"niksy:master","ref":"master","sha":"f569676889e8aa3c935e6b044c4ecf3537649bac","user":{"login":"niksy","id":389286,"node_id":"MDQ6VXNlcjM4OTI4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/389286?v=4","gravatar_id":"","url":"https://api.github.com/users/niksy","html_url":"https://github.com/niksy","followers_url":"https://api.github.com/users/niksy/followers","following_url":"https://api.github.com/users/niksy/following{/other_user}","gists_url":"https://api.github.com/users/niksy/gists{/gist_id}","starred_url":"https://api.github.com/users/niksy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niksy/subscriptions","organizations_url":"https://api.github.com/users/niksy/orgs","repos_url":"https://api.github.com/users/niksy/repos","events_url":"https://api.github.com/users/niksy/events{/privacy}","received_events_url":"https://api.github.com/users/niksy/received_events","type":"User","site_admin":false},"repo":{"id":28270199,"node_id":"MDEwOlJlcG9zaXRvcnkyODI3MDE5OQ==","name":"throttle-debounce","full_name":"niksy/throttle-debounce","private":false,"owner":{"login":"niksy","id":389286,"node_id":"MDQ6VXNlcjM4OTI4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/389286?v=4","gravatar_id":"","url":"https://api.github.com/users/niksy","html_url":"https://github.com/niksy","followers_url":"https://api.github.com/users/niksy/followers","following_url":"https://api.github.com/users/niksy/following{/other_user}","gists_url":"https://api.github.com/users/niksy/gists{/gist_id}","starred_url":"https://api.github.com/users/niksy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niksy/subscriptions","organizations_url":"https://api.github.com/users/niksy/orgs","repos_url":"https://api.github.com/users/niksy/repos","events_url":"https://api.github.com/users/niksy/events{/privacy}","received_events_url":"https://api.github.com/users/niksy/received_events","type":"User","site_admin":false},"html_url":"https://github.com/niksy/throttle-debounce","description":"Throttle and debounce functions.","fork":false,"url":"https://api.github.com/repos/niksy/throttle-debounce","forks_url":"https://api.github.com/repos/niksy/throttle-debounce/forks","keys_url":"https://api.github.com/repos/niksy/throttle-debounce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niksy/throttle-debounce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niksy/throttle-debounce/teams","hooks_url":"https://api.github.com/repos/niksy/throttle-debounce/hooks","issue_events_url":"https://api.github.com/repos/niksy/throttle-debounce/issues/events{/number}","events_url":"https://api.github.com/repos/niksy/throttle-debounce/events","assignees_url":"https://api.github.com/repos/niksy/throttle-debounce/assignees{/user}","branches_url":"https://api.github.com/repos/niksy/throttle-debounce/branches{/branch}","tags_url":"https://api.github.com/repos/niksy/throttle-debounce/tags","blobs_url":"https://api.github.com/repos/niksy/throttle-debounce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niksy/throttle-debounce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niksy/throttle-debounce/git/refs{/sha}","trees_url":"https://api.github.com/repos/niksy/throttle-debounce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niksy/throttle-debounce/statuses/{sha}","languages_url":"https://api.github.com/repos/niksy/throttle-debounce/languages","stargazers_url":"https://api.github.com/repos/niksy/throttle-debounce/stargazers","contributors_url":"https://api.github.com/repos/niksy/throttle-debounce/contributors","subscribers_url":"https://api.github.com/repos/niksy/throttle-debounce/subscribers","subscription_url":"https://api.github.com/repos/niksy/throttle-debounce/subscription","commits_url":"https://api.github.com/repos/niksy/throttle-debounce/commits{/sha}","git_commits_url":"https://api.github.com/repos/niksy/throttle-debounce/git/commits{/sha}","comments_url":"https://api.github.com/repos/niksy/throttle-debounce/comments{/number}","issue_comment_url":"https://api.github.com/repos/niksy/throttle-debounce/issues/comments{/number}","contents_url":"https://api.github.com/repos/niksy/throttle-debounce/contents/{+path}","compare_url":"https://api.github.com/repos/niksy/throttle-debounce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niksy/throttle-debounce/merges","archive_url":"https://api.github.com/repos/niksy/throttle-debounce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niksy/throttle-debounce/downloads","issues_url":"https://api.github.com/repos/niksy/throttle-debounce/issues{/number}","pulls_url":"https://api.github.com/repos/niksy/throttle-debounce/pulls{/number}","milestones_url":"https://api.github.com/repos/niksy/throttle-debounce/milestones{/number}","notifications_url":"https://api.github.com/repos/niksy/throttle-debounce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niksy/throttle-debounce/labels{/name}","releases_url":"https://api.github.com/repos/niksy/throttle-debounce/releases{/id}","deployments_url":"https://api.github.com/repos/niksy/throttle-debounce/deployments","created_at":"2014-12-20T15:10:18Z","updated_at":"2018-10-24T07:28:40Z","pushed_at":"2018-10-24T07:28:39Z","git_url":"git://github.com/niksy/throttle-debounce.git","ssh_url":"git@github.com:niksy/throttle-debounce.git","clone_url":"https://github.com/niksy/throttle-debounce.git","svn_url":"https://github.com/niksy/throttle-debounce","homepage":"","size":36,"stargazers_count":273,"watchers_count":273,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":30,"open_issues":7,"watchers":273,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/niksy/throttle-debounce/pulls/26"},"html":{"href":"https://github.com/niksy/throttle-debounce/pull/26"},"issue":{"href":"https://api.github.com/repos/niksy/throttle-debounce/issues/26"},"comments":{"href":"https://api.github.com/repos/niksy/throttle-debounce/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/niksy/throttle-debounce/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/niksy/throttle-debounce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/niksy/throttle-debounce/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/niksy/throttle-debounce/statuses/4ed5bd14c18f77ef222bddb6cbf64e6a5f1423b1"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":4,"additions":53,"deletions":12,"changed_files":4}}
{"actor":{"display_login":"whatknight"}}