Skip to content
loading...

re: Why is Lodash Still Useful? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Someone in another component has already shown how to implement times and debounce.Get can be achived with optional chaining, so heres how to do ke...
 

To avoid Object.fromEntries, there is .reduce.

arr.map(o => [o[key], o]).reduce((prev, [k, v]) => { ...prev, [k]: v }, {})

Actually, with map, filter, reduce -- you can do a lot.

It is impossible to say that you cannot do something in one-liner JavaScript, because minified JS is also a one liner.

 

I agree. I think there're things like differenceWith in Lodash that are harder to implement by ourselves and not available in the standard library.

code of conduct - report abuse