You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, lodash/flatten can be replaced with Array.prototype.flat() and even combined with Array.prototype.map() by using Array.prototype.flatMap().
That's good to hear . I wasn't sure of the reaction especially after seeing this comment and how it was closed for being "too controversial", whatever that means. Maybe it was the aggressive attitude. Anyway, I agree with the sentiment that this packages should have a smaller footprint and less dependencies if at all possible.
For example,
lodash/flatten
can be replaced withArray.prototype.flat()
and even combined withArray.prototype.map()
by usingArray.prototype.flatMap()
.Example:
ava/lib/line-numbers.js
Lines 52 to 58 in e8a4976
Would this be something that is of interest? Eventually being able to remove Lodash would save ~1.3 MB (over 2.2 MB on my disk)
Here's a good resource
The text was updated successfully, but these errors were encountered: