{"action":"created","issue":{"url":"https://api.github.com/repos/es-shims/Object.entries/issues/7","repository_url":"https://api.github.com/repos/es-shims/Object.entries","labels_url":"https://api.github.com/repos/es-shims/Object.entries/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/es-shims/Object.entries/issues/7/comments","events_url":"https://api.github.com/repos/es-shims/Object.entries/issues/7/events","html_url":"https://github.com/es-shims/Object.entries/issues/7","id":154800756,"number":7,"title":"Add example for ES6 to README","user":{"login":"C3realGuy","id":6577095,"avatar_url":"https://avatars.githubusercontent.com/u/6577095?v=3","gravatar_id":"","url":"https://api.github.com/users/C3realGuy","html_url":"https://github.com/C3realGuy","followers_url":"https://api.github.com/users/C3realGuy/followers","following_url":"https://api.github.com/users/C3realGuy/following{/other_user}","gists_url":"https://api.github.com/users/C3realGuy/gists{/gist_id}","starred_url":"https://api.github.com/users/C3realGuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C3realGuy/subscriptions","organizations_url":"https://api.github.com/users/C3realGuy/orgs","repos_url":"https://api.github.com/users/C3realGuy/repos","events_url":"https://api.github.com/users/C3realGuy/events{/privacy}","received_events_url":"https://api.github.com/users/C3realGuy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-13T21:08:59Z","updated_at":"2016-05-14T18:22:19Z","closed_at":null,"body":"Maybe add a small example for ES6 usage to README.md to make usage of Object.entries() more clear.\r\n\r\n```\r\nimport entries from 'object.entries';\r\n\r\nif (!Object.entries) {\r\n    entries.shim();\r\n}\r\n\r\nvar exampleObject = {foo: \"bar\", foo2: \"bar2\"};\r\n\r\nfor(let [key, value] of Object.entries(exampleObject)){\r\n  console.log(key+\" \"+value);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/es-shims/Object.entries/issues/comments/219235393","html_url":"https://github.com/es-shims/Object.entries/issues/7#issuecomment-219235393","issue_url":"https://api.github.com/repos/es-shims/Object.entries/issues/7","id":219235393,"user":{"login":"C3realGuy","id":6577095,"avatar_url":"https://avatars.githubusercontent.com/u/6577095?v=3","gravatar_id":"","url":"https://api.github.com/users/C3realGuy","html_url":"https://github.com/C3realGuy","followers_url":"https://api.github.com/users/C3realGuy/followers","following_url":"https://api.github.com/users/C3realGuy/following{/other_user}","gists_url":"https://api.github.com/users/C3realGuy/gists{/gist_id}","starred_url":"https://api.github.com/users/C3realGuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C3realGuy/subscriptions","organizations_url":"https://api.github.com/users/C3realGuy/orgs","repos_url":"https://api.github.com/users/C3realGuy/repos","events_url":"https://api.github.com/users/C3realGuy/events{/privacy}","received_events_url":"https://api.github.com/users/C3realGuy/received_events","type":"User","site_admin":false},"created_at":"2016-05-14T18:22:19Z","updated_at":"2016-05-14T18:22:19Z","body":"That's a point, but still i had to dig into the code to understand how things are working, wouldn't use Object.entries without an ES6 syntax, but that's more a personal preference. I think the ES6 example is more clear how Object.entries is useful as some ```assert.deepEqual(Object.entries(obj), expected);```. I never used this *assert* module, maybe i'm missing something out. Anyways, the example relies on this assert module, which is not needed to use Object.entries and therefore not a good and self explaining example in my opinion.\r\n\r\nIf we think about the future, ES6 will be the standard, why not give it a short example?\r\nI'm using Object.entries only for [key, value], that was the reason i looked for this module, and maybe some others are doing this too. A self explaining example would be a good thing."}}