{"action":"created","issue":{"url":"https://api.github.com/repos/jashkenas/underscore/issues/2208","labels_url":"https://api.github.com/repos/jashkenas/underscore/issues/2208/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/underscore/issues/2208/comments","events_url":"https://api.github.com/repos/jashkenas/underscore/issues/2208/events","html_url":"https://github.com/jashkenas/underscore/pull/2208","id":85688322,"number":2208,"title":"Make _.each/_.forEach support ES6 Set/Map","user":{"login":"benjycui","id":3580607,"avatar_url":"https://avatars.githubusercontent.com/u/3580607?v=3","gravatar_id":"","url":"https://api.github.com/users/benjycui","html_url":"https://github.com/benjycui","followers_url":"https://api.github.com/users/benjycui/followers","following_url":"https://api.github.com/users/benjycui/following{/other_user}","gists_url":"https://api.github.com/users/benjycui/gists{/gist_id}","starred_url":"https://api.github.com/users/benjycui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjycui/subscriptions","organizations_url":"https://api.github.com/users/benjycui/orgs","repos_url":"https://api.github.com/users/benjycui/repos","events_url":"https://api.github.com/users/benjycui/events{/privacy}","received_events_url":"https://api.github.com/users/benjycui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-06T03:28:31Z","updated_at":"2015-06-08T13:58:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jashkenas/underscore/pulls/2208","html_url":"https://github.com/jashkenas/underscore/pull/2208","diff_url":"https://github.com/jashkenas/underscore/pull/2208.diff","patch_url":"https://github.com/jashkenas/underscore/pull/2208.patch"},"body":"IMHO, with the approaching of ES6, it is time to support new features. But I am not sure if you want it :-)\r\nSee also: #2147."},"comment":{"url":"https://api.github.com/repos/jashkenas/underscore/issues/comments/110005072","html_url":"https://github.com/jashkenas/underscore/pull/2208#issuecomment-110005072","issue_url":"https://api.github.com/repos/jashkenas/underscore/issues/2208","id":110005072,"user":{"login":"jdalton","id":4303,"avatar_url":"https://avatars.githubusercontent.com/u/4303?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T13:58:12Z","updated_at":"2015-06-08T13:58:12Z","body":"> But for `Map`, this solution is inconsistent with the default behaviour of `_.each`:\r\n\r\nIf you want the familiar arg sig then you can do\r\n`_.each(_.object([...map]), function() {})`\r\n\r\n> Do you think that consistency is worthy of 2 lines of source code? :-)\r\n\r\nIt's not just 2 lines, you're essentially buying into the whole duck type thing which then requires modifying all other methods. Duck typing adds a bit of a wild card to the API too as you don't know how the duck typed method will really act. In this case you probably want a specialized method instead of ones designed for arrays and objects."}}