Replace lodash with native where appropriate
See original GitHub issueI noticed there are a lot of uses of lodash. I think where lodash shines is in avoiding reimplementation of functions like mapValues
within the codebase. However there are a lot of places in the codebase where native functions like Array#map
, Object.assign
, and Array.from(new Set(...))
would be equally understandable, and without the added layer of a library function.
A borderline case is _.flat
which can be replaced by Array#reduce
.
How are we feeling about code coverage? Is it important to nudge up the coverage before making changes like this in library code?
Related: This is still marked as supporting Node 4 in package.json
. The tests run on 6+, and @gr2m I’ve heard you say you’re just about ready to drop support for Node 6. Is there a roadmap or timeline in mind? I’m wondering if we can go right to object spread instead of using Object.assign
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:25 (18 by maintainers)
I’ll get this going 👍
I have no strong feelings either way. I don’t mind replacing usage of lodash as long as it doesn’t make the code harder to read. The coverage is decent now thanks to the relentless effort by Paul 😃