5 ms·
The one advantage I see to having borderline-ridiculous packages such as this is that they do One Thing Well Sure, but one function per package is silly. Why
by kyllo 12y ago
The one advantage I see to having borderline-ridiculous packages such as this is that they do One Thing Well
Sure, but one function per package is silly. Why not just put all the related utility functions in one package? Underscore does One Thing Well too. And if I really, really care about optimizing for small JS file size, I can just go in my Underscore.js file and remove all the functions I don't want to use.
- vog 12y agoOr, use something like the closure compiler to remove unused code automaticaly.
- insin 12y agoOr you could use Lo-Dash and require() the specific functions you actually used instead of the whole thing, after you're done: https://www.npmjs.com/browse/keyword/lodash-modularized https://www.npmjs.com/browse/keyword/lodash-modularized It's nice to have the option.