Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Or 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

It's nice to have the option.


Or, use something like the closure compiler to remove unused code automaticaly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: