Live data from Hacker News

Lodash 4.0.0 is out

github.com

11–20 of 102 posts

Re: Lodash 4.0.0 is out

#11
post #3

Not sure if this is a dumb question but I haven't been able to find an answer anywhere. I currently use underscore 1.8.3. Can I just swap lodash in, or is refactoring involved? I know it's a fork, and I want to move over, but was curious if anyone know off the top of their heads if a lot of work as involved.

I've done similar refactorings in the past (somehow my fingers only remember `npm install underscore`) and for me it has always been a drop-in replacement. However, as others have pointed out, it does depend on how much functions you are using and from my experience the whole thing should not take long.

Re: Lodash 4.0.0 is out

#12

I think it's time to check out a jquery alternative. My recent projects are basically only using deep copies and some semi-complex selectors. lodash + querySelector should cover pretty much everything at this point.

Have you checked out Lea Verou's Bliss.js? http://blissfuljs.com/ It's super minimal and basically relies on querySelector. Give it a whirl and see if it fits your needs.

Re: Lodash 4.0.0 is out

#15

why drop bower support damn it!

Yeah there is no need to drop bower support. I prefer bower over NPM. I don't understand this. Great work by the way.

I think the thinking behind dropping the support is something like this:

I use browserify/webpack/node and npm is great. I wish more libs that I use were also on npm so that I wouldnt have to fork/shim them. How can I force other people to use npm? Maybe if I drop bower support for my awesome lib that everyone uses, other libs will follow suit, or perhaps the users will see the light and stop using bower because it sucks.

Re: Lodash 4.0.0 is out

#17

why drop bower support damn it!

Lodash dropped bower support in favor of npm because "16% use bower vs. 76% npm for AMD packages": https://twitter.com/jdalton/status/677323442488672257

...according to a twitter poll on a personal account :P

I avoid bower wherever possible, but removing support does smell a bit like an activist move. There may be more to the story, though.

Re: Lodash 4.0.0 is out

#19
post #3

Not sure if this is a dumb question but I haven't been able to find an answer anywhere. I currently use underscore 1.8.3. Can I just swap lodash in, or is refactoring involved? I know it's a fork, and I want to move over, but was curious if anyone know off the top of their heads if a lot of work as involved.

I'll put this here just in case no one comments. https://lodash.com/docs#forEach http://underscorejs.org/#each

If I'm correct, you're showing this as a counter example to prove that the two have incompatible APIs and are thus LoDash can't be used ad a drop in replacement. However, Lodash does alias it's 'forEach' function with 'each', so this wouldn't be an issue?

Re: Lodash 4.0.0 is out

#20
post #16

oh nice, they dropped ie9 support! oh no, so many breaking changes that I cant use it!

> so many breaking changes that I cant use it!

Isn't that the point of a major version bump? It's not like being mad at 3.11.0 wrecking everything.

Post reply on HN