BT

Lodash 4.0 Adds Smaller Core and Plenty of Changes

by David Iffland on Jan 14, 2016 |

Version 4.0 of the JavaScript utility library Lodash has been released, offering up a new core library and plenty of changes.

Lodash has continued to add more features and the library's file size has continued to grow. While some developers may want to have it all, others don't need everything and could benefit from a smaller library. To accommodate these conflicting goals, a new core version is available that weighs in at 12 K (4 K gzipped). This version contains 65 of the most critical features such as foreach and map. On the flip side, the full-blown version has added 80 new methods such as flatMap and toLower.

Because Lodash follows SemVer, a bump in the major version implies that there are breaking changes. While some libraries may bump the major version with just a small breaking change, there are plenty of changes for Lodash 4.0 making this a worthwhile upgrade. 

You'll no longer find Lodash on Bower as the front-end package manager has fallen out of favor with developers. Instead, npm will be the main distribution point. The category names have been dropped so requiring individual functions is now easier.

Last year, the teams behind Lodash and Underscore began discussions on merging the two libraries. In the release notes for version 4.0, John-David Dalton said this new version is the result of those discussions:

Much of Lodash v4 is proofing out the ideas from those discussions. Lodash v4 would not be possible without the input & contributions of the Underscore core team. In the spirit of merging our teams have blended with several members contributing to both libraries.

For more information on the project, check out the Lodash website and the GitHub repository.

Rate this Article

Relevance
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
General Feedback
Bugs
Advertising
Editorial
Marketing
InfoQ.com and all content copyright © 2006-2016 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT