{"action":"closed","number":15,"pull_request":{"url":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/15","id":55338815,"html_url":"https://github.com/hemanth/paws-on-es6/pull/15","diff_url":"https://github.com/hemanth/paws-on-es6/pull/15.diff","patch_url":"https://github.com/hemanth/paws-on-es6/pull/15.patch","issue_url":"https://api.github.com/repos/hemanth/paws-on-es6/issues/15","number":15,"state":"closed","locked":false,"title":"better example for WeakMap","user":{"login":"404pnf","id":310443,"avatar_url":"https://avatars.githubusercontent.com/u/310443?v=3","gravatar_id":"","url":"https://api.github.com/users/404pnf","html_url":"https://github.com/404pnf","followers_url":"https://api.github.com/users/404pnf/followers","following_url":"https://api.github.com/users/404pnf/following{/other_user}","gists_url":"https://api.github.com/users/404pnf/gists{/gist_id}","starred_url":"https://api.github.com/users/404pnf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/404pnf/subscriptions","organizations_url":"https://api.github.com/users/404pnf/orgs","repos_url":"https://api.github.com/users/404pnf/repos","events_url":"https://api.github.com/users/404pnf/events{/privacy}","received_events_url":"https://api.github.com/users/404pnf/received_events","type":"User","site_admin":false},"body":"Previous example doesn't show the feature of WeakMap since we delete the key explicitly.  Same goes for WeakSet\r\n\r\n> The key in a WeakMap is held weakly.  What this means is that, if there are no other strong references to the key, then the entire entry will be removed from the WeakMap by the garbage collector.\r\n\r\nAnother example will be a page element as key, later the page element is removed from the page?\r\n\r\nwm.set($('#banner'), 'banner exist');\r\n\r\n$('#banner').remove();\r\n\r\nwm.has($('#banner')); // false\r\n\r\nI wonder why the MDN page doesn't have a example like this.  I think the point of WeakMap is you don't need to delete the entries.  The garbage collector does it for you.","created_at":"2016-01-07T13:42:40Z","updated_at":"2016-01-19T07:06:39Z","closed_at":"2016-01-19T07:06:39Z","merged_at":"2016-01-19T07:06:39Z","merge_commit_sha":"04e43f11c966840d2d3c265768e05a02cefb2bc7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/15/commits","review_comments_url":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/15/comments","review_comment_url":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hemanth/paws-on-es6/issues/15/comments","statuses_url":"https://api.github.com/repos/hemanth/paws-on-es6/statuses/b192b4b865b8ef2ce6bb71a057605dcfc1662f2f","head":{"label":"404pnf:patch-1","ref":"patch-1","sha":"b192b4b865b8ef2ce6bb71a057605dcfc1662f2f","user":{"login":"404pnf","id":310443,"avatar_url":"https://avatars.githubusercontent.com/u/310443?v=3","gravatar_id":"","url":"https://api.github.com/users/404pnf","html_url":"https://github.com/404pnf","followers_url":"https://api.github.com/users/404pnf/followers","following_url":"https://api.github.com/users/404pnf/following{/other_user}","gists_url":"https://api.github.com/users/404pnf/gists{/gist_id}","starred_url":"https://api.github.com/users/404pnf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/404pnf/subscriptions","organizations_url":"https://api.github.com/users/404pnf/orgs","repos_url":"https://api.github.com/users/404pnf/repos","events_url":"https://api.github.com/users/404pnf/events{/privacy}","received_events_url":"https://api.github.com/users/404pnf/received_events","type":"User","site_admin":false},"repo":{"id":49105994,"name":"paws-on-es6","full_name":"404pnf/paws-on-es6","owner":{"login":"404pnf","id":310443,"avatar_url":"https://avatars.githubusercontent.com/u/310443?v=3","gravatar_id":"","url":"https://api.github.com/users/404pnf","html_url":"https://github.com/404pnf","followers_url":"https://api.github.com/users/404pnf/followers","following_url":"https://api.github.com/users/404pnf/following{/other_user}","gists_url":"https://api.github.com/users/404pnf/gists{/gist_id}","starred_url":"https://api.github.com/users/404pnf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/404pnf/subscriptions","organizations_url":"https://api.github.com/users/404pnf/orgs","repos_url":"https://api.github.com/users/404pnf/repos","events_url":"https://api.github.com/users/404pnf/events{/privacy}","received_events_url":"https://api.github.com/users/404pnf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/404pnf/paws-on-es6","description":"Minimalist examples of ES6 functionalities.","fork":true,"url":"https://api.github.com/repos/404pnf/paws-on-es6","forks_url":"https://api.github.com/repos/404pnf/paws-on-es6/forks","keys_url":"https://api.github.com/repos/404pnf/paws-on-es6/keys{/key_id}","collaborators_url":"https://api.github.com/repos/404pnf/paws-on-es6/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/404pnf/paws-on-es6/teams","hooks_url":"https://api.github.com/repos/404pnf/paws-on-es6/hooks","issue_events_url":"https://api.github.com/repos/404pnf/paws-on-es6/issues/events{/number}","events_url":"https://api.github.com/repos/404pnf/paws-on-es6/events","assignees_url":"https://api.github.com/repos/404pnf/paws-on-es6/assignees{/user}","branches_url":"https://api.github.com/repos/404pnf/paws-on-es6/branches{/branch}","tags_url":"https://api.github.com/repos/404pnf/paws-on-es6/tags","blobs_url":"https://api.github.com/repos/404pnf/paws-on-es6/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/404pnf/paws-on-es6/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/404pnf/paws-on-es6/git/refs{/sha}","trees_url":"https://api.github.com/repos/404pnf/paws-on-es6/git/trees{/sha}","statuses_url":"https://api.github.com/repos/404pnf/paws-on-es6/statuses/{sha}","languages_url":"https://api.github.com/repos/404pnf/paws-on-es6/languages","stargazers_url":"https://api.github.com/repos/404pnf/paws-on-es6/stargazers","contributors_url":"https://api.github.com/repos/404pnf/paws-on-es6/contributors","subscribers_url":"https://api.github.com/repos/404pnf/paws-on-es6/subscribers","subscription_url":"https://api.github.com/repos/404pnf/paws-on-es6/subscription","commits_url":"https://api.github.com/repos/404pnf/paws-on-es6/commits{/sha}","git_commits_url":"https://api.github.com/repos/404pnf/paws-on-es6/git/commits{/sha}","comments_url":"https://api.github.com/repos/404pnf/paws-on-es6/comments{/number}","issue_comment_url":"https://api.github.com/repos/404pnf/paws-on-es6/issues/comments{/number}","contents_url":"https://api.github.com/repos/404pnf/paws-on-es6/contents/{+path}","compare_url":"https://api.github.com/repos/404pnf/paws-on-es6/compare/{base}...{head}","merges_url":"https://api.github.com/repos/404pnf/paws-on-es6/merges","archive_url":"https://api.github.com/repos/404pnf/paws-on-es6/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/404pnf/paws-on-es6/downloads","issues_url":"https://api.github.com/repos/404pnf/paws-on-es6/issues{/number}","pulls_url":"https://api.github.com/repos/404pnf/paws-on-es6/pulls{/number}","milestones_url":"https://api.github.com/repos/404pnf/paws-on-es6/milestones{/number}","notifications_url":"https://api.github.com/repos/404pnf/paws-on-es6/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/404pnf/paws-on-es6/labels{/name}","releases_url":"https://api.github.com/repos/404pnf/paws-on-es6/releases{/id}","created_at":"2016-01-06T02:16:07Z","updated_at":"2016-01-06T02:16:08Z","pushed_at":"2016-01-19T06:02:48Z","git_url":"git://github.com/404pnf/paws-on-es6.git","ssh_url":"git@github.com:404pnf/paws-on-es6.git","clone_url":"https://github.com/404pnf/paws-on-es6.git","svn_url":"https://github.com/404pnf/paws-on-es6","homepage":"http://git.io/es6-paws","size":24,"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":"hemanth:master","ref":"master","sha":"dedfd1d72145014ee71297caabb17472d5639ae9","user":{"login":"hemanth","id":18315,"avatar_url":"https://avatars.githubusercontent.com/u/18315?v=3","gravatar_id":"","url":"https://api.github.com/users/hemanth","html_url":"https://github.com/hemanth","followers_url":"https://api.github.com/users/hemanth/followers","following_url":"https://api.github.com/users/hemanth/following{/other_user}","gists_url":"https://api.github.com/users/hemanth/gists{/gist_id}","starred_url":"https://api.github.com/users/hemanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hemanth/subscriptions","organizations_url":"https://api.github.com/users/hemanth/orgs","repos_url":"https://api.github.com/users/hemanth/repos","events_url":"https://api.github.com/users/hemanth/events{/privacy}","received_events_url":"https://api.github.com/users/hemanth/received_events","type":"User","site_admin":false},"repo":{"id":17178991,"name":"paws-on-es6","full_name":"hemanth/paws-on-es6","owner":{"login":"hemanth","id":18315,"avatar_url":"https://avatars.githubusercontent.com/u/18315?v=3","gravatar_id":"","url":"https://api.github.com/users/hemanth","html_url":"https://github.com/hemanth","followers_url":"https://api.github.com/users/hemanth/followers","following_url":"https://api.github.com/users/hemanth/following{/other_user}","gists_url":"https://api.github.com/users/hemanth/gists{/gist_id}","starred_url":"https://api.github.com/users/hemanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hemanth/subscriptions","organizations_url":"https://api.github.com/users/hemanth/orgs","repos_url":"https://api.github.com/users/hemanth/repos","events_url":"https://api.github.com/users/hemanth/events{/privacy}","received_events_url":"https://api.github.com/users/hemanth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hemanth/paws-on-es6","description":"Minimalist examples of ES6 functionalities.","fork":false,"url":"https://api.github.com/repos/hemanth/paws-on-es6","forks_url":"https://api.github.com/repos/hemanth/paws-on-es6/forks","keys_url":"https://api.github.com/repos/hemanth/paws-on-es6/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hemanth/paws-on-es6/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hemanth/paws-on-es6/teams","hooks_url":"https://api.github.com/repos/hemanth/paws-on-es6/hooks","issue_events_url":"https://api.github.com/repos/hemanth/paws-on-es6/issues/events{/number}","events_url":"https://api.github.com/repos/hemanth/paws-on-es6/events","assignees_url":"https://api.github.com/repos/hemanth/paws-on-es6/assignees{/user}","branches_url":"https://api.github.com/repos/hemanth/paws-on-es6/branches{/branch}","tags_url":"https://api.github.com/repos/hemanth/paws-on-es6/tags","blobs_url":"https://api.github.com/repos/hemanth/paws-on-es6/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hemanth/paws-on-es6/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hemanth/paws-on-es6/git/refs{/sha}","trees_url":"https://api.github.com/repos/hemanth/paws-on-es6/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hemanth/paws-on-es6/statuses/{sha}","languages_url":"https://api.github.com/repos/hemanth/paws-on-es6/languages","stargazers_url":"https://api.github.com/repos/hemanth/paws-on-es6/stargazers","contributors_url":"https://api.github.com/repos/hemanth/paws-on-es6/contributors","subscribers_url":"https://api.github.com/repos/hemanth/paws-on-es6/subscribers","subscription_url":"https://api.github.com/repos/hemanth/paws-on-es6/subscription","commits_url":"https://api.github.com/repos/hemanth/paws-on-es6/commits{/sha}","git_commits_url":"https://api.github.com/repos/hemanth/paws-on-es6/git/commits{/sha}","comments_url":"https://api.github.com/repos/hemanth/paws-on-es6/comments{/number}","issue_comment_url":"https://api.github.com/repos/hemanth/paws-on-es6/issues/comments{/number}","contents_url":"https://api.github.com/repos/hemanth/paws-on-es6/contents/{+path}","compare_url":"https://api.github.com/repos/hemanth/paws-on-es6/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hemanth/paws-on-es6/merges","archive_url":"https://api.github.com/repos/hemanth/paws-on-es6/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hemanth/paws-on-es6/downloads","issues_url":"https://api.github.com/repos/hemanth/paws-on-es6/issues{/number}","pulls_url":"https://api.github.com/repos/hemanth/paws-on-es6/pulls{/number}","milestones_url":"https://api.github.com/repos/hemanth/paws-on-es6/milestones{/number}","notifications_url":"https://api.github.com/repos/hemanth/paws-on-es6/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hemanth/paws-on-es6/labels{/name}","releases_url":"https://api.github.com/repos/hemanth/paws-on-es6/releases{/id}","created_at":"2014-02-25T16:06:05Z","updated_at":"2016-01-19T06:11:05Z","pushed_at":"2016-01-19T07:06:39Z","git_url":"git://github.com/hemanth/paws-on-es6.git","ssh_url":"git@github.com:hemanth/paws-on-es6.git","clone_url":"https://github.com/hemanth/paws-on-es6.git","svn_url":"https://github.com/hemanth/paws-on-es6","homepage":"http://git.io/es6-paws","size":23,"stargazers_count":224,"watchers_count":224,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":0,"forks":20,"open_issues":0,"watchers":224,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/15"},"html":{"href":"https://github.com/hemanth/paws-on-es6/pull/15"},"issue":{"href":"https://api.github.com/repos/hemanth/paws-on-es6/issues/15"},"comments":{"href":"https://api.github.com/repos/hemanth/paws-on-es6/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hemanth/paws-on-es6/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/hemanth/paws-on-es6/statuses/b192b4b865b8ef2ce6bb71a057605dcfc1662f2f"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"hemanth","id":18315,"avatar_url":"https://avatars.githubusercontent.com/u/18315?v=3","gravatar_id":"","url":"https://api.github.com/users/hemanth","html_url":"https://github.com/hemanth","followers_url":"https://api.github.com/users/hemanth/followers","following_url":"https://api.github.com/users/hemanth/following{/other_user}","gists_url":"https://api.github.com/users/hemanth/gists{/gist_id}","starred_url":"https://api.github.com/users/hemanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hemanth/subscriptions","organizations_url":"https://api.github.com/users/hemanth/orgs","repos_url":"https://api.github.com/users/hemanth/repos","events_url":"https://api.github.com/users/hemanth/events{/privacy}","received_events_url":"https://api.github.com/users/hemanth/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":2,"additions":10,"deletions":2,"changed_files":1}}