{"action":"created","issue":{"url":"https://api.github.com/repos/ramda/ramda/issues/933","labels_url":"https://api.github.com/repos/ramda/ramda/issues/933/labels{/name}","comments_url":"https://api.github.com/repos/ramda/ramda/issues/933/comments","events_url":"https://api.github.com/repos/ramda/ramda/issues/933/events","html_url":"https://github.com/ramda/ramda/issues/933","id":62548410,"number":933,"title":"Old environment bugs.","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-18T00:21:53Z","updated_at":"2015-03-18T14:46:36Z","closed_at":null,"body":"I was talking with @CrossEye on gitter and he suggested I post on some of the older environment issues that Ramda could address.\r\n\r\n* `[DontEnum]` bug in IE < 9 skips iterating enumerable object properties that exist as non-enumerable properties of the `Object.prototype`. (so props like `constructor`, `toString`, & `valueOf`)\r\n* `Function.prototype` iteration. Some older WebKit enviros will incorrectly treat the `.prototype` property of functions as enumerable.\r\n* `arguments` object iteration. Some older WebKit treat its indexes as non-enumerable.\r\n* Access of string chars through indexes (IE < 9 for string objects; IE < 8 for string primitives)\r\n* Iteration of strings (some environments treat string indexes as non-enumerable)\r\n\r\nFor a summary of issues and affected environments check out the [support](https://github.com/lodash/lodash-compat/blob/3.5.0-npm/support.js#L38-L188) module of lodash-compat.\r\n\r\nInstead of reworking fixes for these issues, as Underscore and Amp have tried and failed to do correctly, it would be great if Ramda leveraged modules, specifically [lodash-compat](https://www.npmjs.com/package/lodash-compat) modules, to tackle it.\r\n\r\n```js\r\nvar keys = require('lodash-compat/object/keys'),\r\n    keysIn = require('lodash-compat/object/keysIn');\r\n``` \r\n\r\nIt should integrate into your build easy enough and has tackled these issues already. lodash is tested in old enviros and even IE compat modes so it's got these issues covered. So you could require the modules you need and avoid the headache of older environment fixes.\r\n\r\nThe [keys](https://github.com/lodash/lodash-compat/blob/3.5.0-npm/object/keys.js) and [keysIn](https://github.com/lodash/lodash-compat/blob/3.5.0-npm/object/keysIn.js) methods should do for most things (for-in et al), even strings as it follows ES6 rules and coerces them to objects. There's also [forOwn](https://github.com/lodash/lodash-compat/blob/3.5.0-npm/object/forOwn.js) and [forIn](https://github.com/lodash/lodash-compat/blob/3.5.0-npm/object/forIn.js) if you want."},"comment":{"url":"https://api.github.com/repos/ramda/ramda/issues/comments/83003909","html_url":"https://github.com/ramda/ramda/issues/933#issuecomment-83003909","issue_url":"https://api.github.com/repos/ramda/ramda/issues/933","id":83003909,"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-03-18T14:46:36Z","updated_at":"2015-03-18T14:46:36Z","body":">  Could you point to how lodash does this so that we might be able to use it as a model?\r\n\r\nThe whole point about using modules/packages is so you don't have to worry about it.\r\n\r\n>  I just don't know of places where we iterate Strings\r\n\r\nAs @kevinbeaty mentioned, I've heard with the addition of transducers strings could be supported.\r\n\r\n> or the arguments object,\r\n\r\nJust think of an `arguments` object as an object.\r\n\r\n>  @buzzdecafe points out that our keys implementation does already handle the DontEnum issue\r\n\r\nIt only partially covers it. The `DontEnum` issue is pretty tricky. For example when iterating a `prototype` object several properties may rightly be non-enumerable.\r\n\r\n> Remember that Ramda has a fairly focused API; we don't do what Underscore and lodash and FKit to try to unify handling of arrays, objects, strings, etc\r\n\r\nI don't think that's what this issue is about. It's about iterating values correctly across enviros.\r\n\r\n> but even a pointer to what functions could cause issues would help.\r\n\r\nI noticed several places in Ramda that use for-in loops and each one has issues with value iteration."}}