{"action":"created","comment":{"url":"https://api.github.com/repos/paulmillr/es6-shim/pulls/comments/22443899","id":22443899,"diff_hunk":"@@ -756,6 +771,64 @@\n   });\n   addIterator(ArrayIterator.prototype);\n \n+  var ObjectIterator = function (object, kind) {\n+    this.object = object;\n+    this.i = 0;\n+    // Don't generate keys yet.\n+    this.array = null;\n+    this.kind = kind;\n+  };\n+\n+  defineProperties(ObjectIterator.prototype, {\n+    next: function () {\n+      var key, array = this.array;\n+      if (!(this instanceof ObjectIterator)) {\n+        throw new TypeError('Not an ObjectIterator');\n+      }\n+\n+      if (typeof array !== 'undefined') {\n+        // Keys not generated\n+        if (array === null) {\n+          array = this.array = [];\n+\n+          for (key in this.object) {\n+            array.push(key);\n+          }\n+        }\n+\n+        var len = ES.ToLength(array.length);\n+\n+        // Find current index, then update i\n+        while (this.i < len) {\n+          key = array[this.i];\n+          this.i++;\n+\n+          // The candidate key isn't defined on object.\n+          // Must have been deleted, or object[[Prototype]]\n+          // has been modified.\n+          if (!(key in this.object)) {\n+            continue;\n+          }\n+\n+          switch (this.kind) {\n+          case 'key':\n+            return iterator_result(key);\n+          case 'value':\n+            return iterator_result(this.object[key]);\n+          case 'entry':\n+            return iterator_result([key, this.object[key]]);\n+          }\n+        }\n+\n+        // End of key array.\n+        this.array = void 0;\n+      }\n+\n+      return iterator_result();","path":"es6-shim.js","position":96,"original_position":96,"commit_id":"e747c063b0c779b2fd9338c76ec4fcc8829b7413","original_commit_id":"e747c063b0c779b2fd9338c76ec4fcc8829b7413","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"body":"I'm not sure I see the value of this here - why not just `return { done: true };`?","created_at":"2015-01-04T23:21:55Z","updated_at":"2015-01-04T23:21:55Z","html_url":"https://github.com/paulmillr/es6-shim/pull/313#discussion_r22443899","pull_request_url":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313","_links":{"self":{"href":"https://api.github.com/repos/paulmillr/es6-shim/pulls/comments/22443899"},"html":{"href":"https://github.com/paulmillr/es6-shim/pull/313#discussion_r22443899"},"pull_request":{"href":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313"}}},"pull_request":{"url":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313","id":26656007,"html_url":"https://github.com/paulmillr/es6-shim/pull/313","diff_url":"https://github.com/paulmillr/es6-shim/pull/313.diff","patch_url":"https://github.com/paulmillr/es6-shim/pull/313.patch","issue_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/313","number":313,"state":"open","locked":false,"title":"Reflect","user":{"login":"Victorystick","id":703602,"avatar_url":"https://avatars.githubusercontent.com/u/703602?v=3","gravatar_id":"","url":"https://api.github.com/users/Victorystick","html_url":"https://github.com/Victorystick","followers_url":"https://api.github.com/users/Victorystick/followers","following_url":"https://api.github.com/users/Victorystick/following{/other_user}","gists_url":"https://api.github.com/users/Victorystick/gists{/gist_id}","starred_url":"https://api.github.com/users/Victorystick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Victorystick/subscriptions","organizations_url":"https://api.github.com/users/Victorystick/orgs","repos_url":"https://api.github.com/users/Victorystick/repos","events_url":"https://api.github.com/users/Victorystick/events{/privacy}","received_events_url":"https://api.github.com/users/Victorystick/received_events","type":"User","site_admin":false},"body":"The Reflect global is, as far as I know, a part of the ES6 spec. I was a bit surprised not to find it in the es6-shim. Is there any reason as to why it isn't? If not, I'd consider giving it a go.\r\n\r\nI'd like to use this PR to discuss Reflect implementation.","created_at":"2014-12-29T18:46:35Z","updated_at":"2015-01-04T23:21:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cb9010bbb2d7b90aad2e1d35204164f1b38ad54","assignee":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313/commits","review_comments_url":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313/comments","review_comment_url":"https://api.github.com/repos/paulmillr/es6-shim/pulls/comments/{number}","comments_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/313/comments","statuses_url":"https://api.github.com/repos/paulmillr/es6-shim/statuses/e747c063b0c779b2fd9338c76ec4fcc8829b7413","head":{"label":"Victorystick:reflect","ref":"reflect","sha":"e747c063b0c779b2fd9338c76ec4fcc8829b7413","user":{"login":"Victorystick","id":703602,"avatar_url":"https://avatars.githubusercontent.com/u/703602?v=3","gravatar_id":"","url":"https://api.github.com/users/Victorystick","html_url":"https://github.com/Victorystick","followers_url":"https://api.github.com/users/Victorystick/followers","following_url":"https://api.github.com/users/Victorystick/following{/other_user}","gists_url":"https://api.github.com/users/Victorystick/gists{/gist_id}","starred_url":"https://api.github.com/users/Victorystick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Victorystick/subscriptions","organizations_url":"https://api.github.com/users/Victorystick/orgs","repos_url":"https://api.github.com/users/Victorystick/repos","events_url":"https://api.github.com/users/Victorystick/events{/privacy}","received_events_url":"https://api.github.com/users/Victorystick/received_events","type":"User","site_admin":false},"repo":{"id":28598777,"name":"es6-shim","full_name":"Victorystick/es6-shim","owner":{"login":"Victorystick","id":703602,"avatar_url":"https://avatars.githubusercontent.com/u/703602?v=3","gravatar_id":"","url":"https://api.github.com/users/Victorystick","html_url":"https://github.com/Victorystick","followers_url":"https://api.github.com/users/Victorystick/followers","following_url":"https://api.github.com/users/Victorystick/following{/other_user}","gists_url":"https://api.github.com/users/Victorystick/gists{/gist_id}","starred_url":"https://api.github.com/users/Victorystick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Victorystick/subscriptions","organizations_url":"https://api.github.com/users/Victorystick/orgs","repos_url":"https://api.github.com/users/Victorystick/repos","events_url":"https://api.github.com/users/Victorystick/events{/privacy}","received_events_url":"https://api.github.com/users/Victorystick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Victorystick/es6-shim","description":"ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines","fork":true,"url":"https://api.github.com/repos/Victorystick/es6-shim","forks_url":"https://api.github.com/repos/Victorystick/es6-shim/forks","keys_url":"https://api.github.com/repos/Victorystick/es6-shim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Victorystick/es6-shim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Victorystick/es6-shim/teams","hooks_url":"https://api.github.com/repos/Victorystick/es6-shim/hooks","issue_events_url":"https://api.github.com/repos/Victorystick/es6-shim/issues/events{/number}","events_url":"https://api.github.com/repos/Victorystick/es6-shim/events","assignees_url":"https://api.github.com/repos/Victorystick/es6-shim/assignees{/user}","branches_url":"https://api.github.com/repos/Victorystick/es6-shim/branches{/branch}","tags_url":"https://api.github.com/repos/Victorystick/es6-shim/tags","blobs_url":"https://api.github.com/repos/Victorystick/es6-shim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Victorystick/es6-shim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Victorystick/es6-shim/git/refs{/sha}","trees_url":"https://api.github.com/repos/Victorystick/es6-shim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Victorystick/es6-shim/statuses/{sha}","languages_url":"https://api.github.com/repos/Victorystick/es6-shim/languages","stargazers_url":"https://api.github.com/repos/Victorystick/es6-shim/stargazers","contributors_url":"https://api.github.com/repos/Victorystick/es6-shim/contributors","subscribers_url":"https://api.github.com/repos/Victorystick/es6-shim/subscribers","subscription_url":"https://api.github.com/repos/Victorystick/es6-shim/subscription","commits_url":"https://api.github.com/repos/Victorystick/es6-shim/commits{/sha}","git_commits_url":"https://api.github.com/repos/Victorystick/es6-shim/git/commits{/sha}","comments_url":"https://api.github.com/repos/Victorystick/es6-shim/comments{/number}","issue_comment_url":"https://api.github.com/repos/Victorystick/es6-shim/issues/comments/{number}","contents_url":"https://api.github.com/repos/Victorystick/es6-shim/contents/{+path}","compare_url":"https://api.github.com/repos/Victorystick/es6-shim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Victorystick/es6-shim/merges","archive_url":"https://api.github.com/repos/Victorystick/es6-shim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Victorystick/es6-shim/downloads","issues_url":"https://api.github.com/repos/Victorystick/es6-shim/issues{/number}","pulls_url":"https://api.github.com/repos/Victorystick/es6-shim/pulls{/number}","milestones_url":"https://api.github.com/repos/Victorystick/es6-shim/milestones{/number}","notifications_url":"https://api.github.com/repos/Victorystick/es6-shim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Victorystick/es6-shim/labels{/name}","releases_url":"https://api.github.com/repos/Victorystick/es6-shim/releases{/id}","created_at":"2014-12-29T16:47:04Z","updated_at":"2014-12-29T16:47:04Z","pushed_at":"2015-01-04T22:48:54Z","git_url":"git://github.com/Victorystick/es6-shim.git","ssh_url":"git@github.com:Victorystick/es6-shim.git","clone_url":"https://github.com/Victorystick/es6-shim.git","svn_url":"https://github.com/Victorystick/es6-shim","homepage":"http://paulmillr.com","size":1537,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"paulmillr:master","ref":"master","sha":"430615576b8521ed3944848701ee86a2cd99adc1","user":{"login":"paulmillr","id":574696,"avatar_url":"https://avatars.githubusercontent.com/u/574696?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmillr","html_url":"https://github.com/paulmillr","followers_url":"https://api.github.com/users/paulmillr/followers","following_url":"https://api.github.com/users/paulmillr/following{/other_user}","gists_url":"https://api.github.com/users/paulmillr/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmillr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmillr/subscriptions","organizations_url":"https://api.github.com/users/paulmillr/orgs","repos_url":"https://api.github.com/users/paulmillr/repos","events_url":"https://api.github.com/users/paulmillr/events{/privacy}","received_events_url":"https://api.github.com/users/paulmillr/received_events","type":"User","site_admin":false},"repo":{"id":3046507,"name":"es6-shim","full_name":"paulmillr/es6-shim","owner":{"login":"paulmillr","id":574696,"avatar_url":"https://avatars.githubusercontent.com/u/574696?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmillr","html_url":"https://github.com/paulmillr","followers_url":"https://api.github.com/users/paulmillr/followers","following_url":"https://api.github.com/users/paulmillr/following{/other_user}","gists_url":"https://api.github.com/users/paulmillr/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmillr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmillr/subscriptions","organizations_url":"https://api.github.com/users/paulmillr/orgs","repos_url":"https://api.github.com/users/paulmillr/repos","events_url":"https://api.github.com/users/paulmillr/events{/privacy}","received_events_url":"https://api.github.com/users/paulmillr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulmillr/es6-shim","description":"ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines","fork":false,"url":"https://api.github.com/repos/paulmillr/es6-shim","forks_url":"https://api.github.com/repos/paulmillr/es6-shim/forks","keys_url":"https://api.github.com/repos/paulmillr/es6-shim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulmillr/es6-shim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulmillr/es6-shim/teams","hooks_url":"https://api.github.com/repos/paulmillr/es6-shim/hooks","issue_events_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/events{/number}","events_url":"https://api.github.com/repos/paulmillr/es6-shim/events","assignees_url":"https://api.github.com/repos/paulmillr/es6-shim/assignees{/user}","branches_url":"https://api.github.com/repos/paulmillr/es6-shim/branches{/branch}","tags_url":"https://api.github.com/repos/paulmillr/es6-shim/tags","blobs_url":"https://api.github.com/repos/paulmillr/es6-shim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulmillr/es6-shim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulmillr/es6-shim/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulmillr/es6-shim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulmillr/es6-shim/statuses/{sha}","languages_url":"https://api.github.com/repos/paulmillr/es6-shim/languages","stargazers_url":"https://api.github.com/repos/paulmillr/es6-shim/stargazers","contributors_url":"https://api.github.com/repos/paulmillr/es6-shim/contributors","subscribers_url":"https://api.github.com/repos/paulmillr/es6-shim/subscribers","subscription_url":"https://api.github.com/repos/paulmillr/es6-shim/subscription","commits_url":"https://api.github.com/repos/paulmillr/es6-shim/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulmillr/es6-shim/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulmillr/es6-shim/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/comments/{number}","contents_url":"https://api.github.com/repos/paulmillr/es6-shim/contents/{+path}","compare_url":"https://api.github.com/repos/paulmillr/es6-shim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulmillr/es6-shim/merges","archive_url":"https://api.github.com/repos/paulmillr/es6-shim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulmillr/es6-shim/downloads","issues_url":"https://api.github.com/repos/paulmillr/es6-shim/issues{/number}","pulls_url":"https://api.github.com/repos/paulmillr/es6-shim/pulls{/number}","milestones_url":"https://api.github.com/repos/paulmillr/es6-shim/milestones{/number}","notifications_url":"https://api.github.com/repos/paulmillr/es6-shim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulmillr/es6-shim/labels{/name}","releases_url":"https://api.github.com/repos/paulmillr/es6-shim/releases{/id}","created_at":"2011-12-25T00:29:07Z","updated_at":"2015-01-04T16:36:33Z","pushed_at":"2015-01-03T08:46:30Z","git_url":"git://github.com/paulmillr/es6-shim.git","ssh_url":"git@github.com:paulmillr/es6-shim.git","clone_url":"https://github.com/paulmillr/es6-shim.git","svn_url":"https://github.com/paulmillr/es6-shim","homepage":"http://paulmillr.com","size":3340,"stargazers_count":940,"watchers_count":940,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":13,"forks":76,"open_issues":13,"watchers":940,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313"},"html":{"href":"https://github.com/paulmillr/es6-shim/pull/313"},"issue":{"href":"https://api.github.com/repos/paulmillr/es6-shim/issues/313"},"comments":{"href":"https://api.github.com/repos/paulmillr/es6-shim/issues/313/comments"},"review_comments":{"href":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313/comments"},"review_comment":{"href":"https://api.github.com/repos/paulmillr/es6-shim/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/paulmillr/es6-shim/pulls/313/commits"},"statuses":{"href":"https://api.github.com/repos/paulmillr/es6-shim/statuses/e747c063b0c779b2fd9338c76ec4fcc8829b7413"}}}}