BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Lodash 4.0 Adds Smaller Core and Plenty of Changes

Lodash 4.0 Adds Smaller Core and Plenty of Changes

Leia em Português

This item in japanese

Bookmarks

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

Adoption
Style

BT