Re:Lodash v3.0.0
by andrezsanchez on Tuesday January 27, 2015 @02:29PM
(#8955125)
I've tended to avoid both underscore and lodash because they're both in the slew of monolithic pre-npm libraries, however the lazy evaluation looks interesting. I wouldn't be surprised to find a library that handles lazy eval without all the extra features Lodash brings.
[ Parent
| on HN ]
For the shops who don't live and breath js and whose js work is almost entirely browser-based, these monoliths are great. I, for one, am bummed that the js market is moving away from monoliths. e.g. YUI shutting down.
Re:Lodash v3.0.0
by andrezsanchez on Thursday January 29, 2015 @02:41PM
(#8968367)
That's an interesting perspective. I don't have any inherent problems with large libraries, but my problem with some of these 'monoliths' is that other libraries start to depend on the entire library when they only need a small piece of functionality that the library provides.
Substack wrote an article [1] explaining some of the problems that monolithic libraries cause in an ecosystem.
thanks, I'll check that out.
Re:Lodash v3.0.0
by WickyNilliams on Tuesday January 27, 2015 @03:14PM
(#8955468)
With browserify (or webpack) you can require just the functions you want, and only those (and their dependencies) end up in your code base. This is covered in the changelog
Re:Lodash v3.0.0
by acjohnson55 on Tuesday January 27, 2015 @03:06PM
(#8955407)
There is lazy.js (http://danieltao.com/lazy.js/). Also, lodash is highly factored into pieces if you don't want the whole thing.
lodash offers modules for node, es6, amd, individual npm packages and bundled in the primary npm package so you can even do require('lodash/array/chunk').
Re:Lodash v3.0.0
by andrezsanchez on Thursday January 29, 2015 @03:07PM
(#8968532)
I remember trying this a while ago and being disappointed at the amount of dependency code brought in for a rather trivial function, but the modularization is looking much better than it was last time I took a look.