{"action":"created","issue":{"url":"https://api.github.com/repos/dthree/cash/issues/15","repository_url":"https://api.github.com/repos/dthree/cash","labels_url":"https://api.github.com/repos/dthree/cash/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/dthree/cash/issues/15/comments","events_url":"https://api.github.com/repos/dthree/cash/issues/15/events","html_url":"https://github.com/dthree/cash/issues/15","id":136186902,"number":15,"title":"Replace lodash with ESX equivalents","user":{"login":"blockloop","id":3022496,"avatar_url":"https://avatars.githubusercontent.com/u/3022496?v=3","gravatar_id":"","url":"https://api.github.com/users/blockloop","html_url":"https://github.com/blockloop","followers_url":"https://api.github.com/users/blockloop/followers","following_url":"https://api.github.com/users/blockloop/following{/other_user}","gists_url":"https://api.github.com/users/blockloop/gists{/gist_id}","starred_url":"https://api.github.com/users/blockloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockloop/subscriptions","organizations_url":"https://api.github.com/users/blockloop/orgs","repos_url":"https://api.github.com/users/blockloop/repos","events_url":"https://api.github.com/users/blockloop/events{/privacy}","received_events_url":"https://api.github.com/users/blockloop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-24T21:09:42Z","updated_at":"2016-02-24T21:17:30Z","closed_at":null,"body":"Typically I avoid bring up the tired discussion of \"you might not need underscore,\" but this project boasts being \"written in pure ES6.\" That being said, when searching through some of the source code I discovered some basic usages of lodash. Curiosity got the best of me so I grepped this directory for usages of lodash and found the following unique cases\r\n\r\n```\r\n_.extend\r\n_.filter\r\n_.isArray\r\n_.isObject\r\n_.isString\r\n_.map\r\n_.remove\r\n_.toArray\r\n```\r\n\r\nUsages of extend, filter, isArray, map, remove, and toArray can be replaced by built-in features of JavaScript (some much older than ES6). The others (isString and isObject) have simple, one line equivalents. Are you opposed to removing lodash and using the builtin features? If you're okay with it, I'd can submit a PR."},"comment":{"url":"https://api.github.com/repos/dthree/cash/issues/comments/188456614","html_url":"https://github.com/dthree/cash/issues/15#issuecomment-188456614","issue_url":"https://api.github.com/repos/dthree/cash/issues/15","id":188456614,"user":{"login":"blockloop","id":3022496,"avatar_url":"https://avatars.githubusercontent.com/u/3022496?v=3","gravatar_id":"","url":"https://api.github.com/users/blockloop","html_url":"https://github.com/blockloop","followers_url":"https://api.github.com/users/blockloop/followers","following_url":"https://api.github.com/users/blockloop/following{/other_user}","gists_url":"https://api.github.com/users/blockloop/gists{/gist_id}","starred_url":"https://api.github.com/users/blockloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockloop/subscriptions","organizations_url":"https://api.github.com/users/blockloop/orgs","repos_url":"https://api.github.com/users/blockloop/repos","events_url":"https://api.github.com/users/blockloop/events{/privacy}","received_events_url":"https://api.github.com/users/blockloop/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T21:17:29Z","updated_at":"2016-02-24T21:17:29Z","body":"To be more clear on the replacements\r\n\r\n`extend` = [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\r\n`filter` = [arrayInstance.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\r\n`isArray` = [Array.isArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\n`map` = [arrayInstance.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\r\n`toArray` = [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)\r\n\r\nThe other, non-builtins are\r\n\r\nisObject = `(typeof obj === \"object\") && (obj !== null)`\r\nisString = `(typeof obj === 'string' || obj instanceof String)`\r\nremove = `var index = array.indexOf(item); array.splice(index, 1);`\r\n\r\nYou can avoid repetition by putting those last three in a `util.js` file, but putting them inline is arguably less obscure."}}