jfmengels / lodash-codemods

Codemods to simplify upgrading Lodash versions
MIT License
33 stars 8 forks source link

Missing migration/warning for use of each/forEach/etc. inside chains #3

Open davidshepherd7 opened 8 years ago

davidshepherd7 commented 8 years ago

The third bullet point of the 4.0.0 changelog doesn't seem to be handled by the codemod.

It should probably remove the .value() if the forEach is the final call in the chain, and give a warning otherwise.

P. S. Thanks so much for making this, it's been really helpful for our migration!

jfmengels commented 8 years ago

Ha, yes! I actually thought about this one quite a few times when writing the other codemods, but as I didn't seem to have this use-case in my codebase, it completely slipped through my mind.

I've created a PR for this, if you can check it out, that'd be great!

P. S. Thanks so much for making this, it's been really helpful for our migration!

Thanks a lot! I'm really glad it could help others!