Replace lodash dependency with native reduce and filter implementations#8
Replace lodash dependency with native reduce and filter implementations#8wvbe wants to merge 1 commit intobusterjs:masterfrom wvbe:drop-lodash-dependency
Conversation
Natim
left a comment
There was a problem hiding this comment.
This seems like a good idea to be honest.
|
@Natim are you using this package? It'll take some work to bring the setup back to working order |
|
I noticed that since lodash has got some vulnerabilities My dependency tree using Well I guess since babel-istanbul is now deprecated as well, I should probably move out of it altogether. https://github.com/jmcriffey/babel-istanbul#deprecated |
|
@mroderick maybe one should switch multi-glob as a DEPRECATED project and archive its repository if it isn't planned to maintain it anymore. |
|
I did the same thing in #11, which also fixes the tests. |
|
Thanks everyone, good to see this integrated 👍 |
The
lodashdependency was only used to flatten and deduplicate results. These two mutations on an array are quite easily expressed using Array#reduce and Array#filter. By adding a little extra code in lib/multi-glob.js we can drop the dependency on lodash, which is principally better.Deduplicating results was already tested. If flattening results does not work, multiple tests will fail. For this reason I have not added new tests.