Alternative to lodash with ES6

Lodash is great, we have an article about most useful lodash functions. But those functions are pretty low level. They should be at the level of the language itself JavaScript. With ES5 / ES6, JavaScript got more powerful, so it is time to stop using some of lodash function to use their native equivalent. The advantage is that we could more easily tweak the function for our needs which is not possible with lodash. And get more knowledge and confidence about ES6. And also get rid of lodash entirely to have fewer dependencies.

Lodash alternatives are compiled in this repository, please contribute

Another article for alternative to lodash

And 10 of them are explained in this article

array.reduce instead of _.keysBy

Convert array to an object with id as keys

Object.keys instead of _.keys

Convert an object with key to an array

Object.assign or spread operator instead of .defaults or .extends, _.assign...

Clone an object

Array.filter instead of _.filter

Array.find instead of _.find

Union with deduplication

A blog post illustration union, intersection and difference

Mind that it works only with array of values, not of objects