(Alliteration somewhat intended)
The event-based and asynchronous architecture of JavaScript creates a number of common patterns in applications that are repetitive, difficult to test, and somewhat sloppy. Every now and again, a solution will arise that changes the way you write code, and it becomes an indispensable part of the programmer’s arsenal. Take jQuery for instance — a library that greatly simplified DOM access and manipulation. Then came promises – the ability to structure asynchronous requests in a synchronous fashion. For functional programming utilities and more intuitive object manipulation, Underscore.JS was created. These three libraries are principal components of almost any JavaScript application.
Today we have Lo-Dash — the younger, more aggressive sibling to the well-established Underscore.JS. Created by John-David Dalton, Kit Cambridge, and Mathias Bynens, the library boasts additional features, bugfixes, and performance improvements over Underscore.JS. These are not trivial boasts, as Lo-Dash comes from some of the same developers behind Benchmark.JS and jsPerf.com. Let’s look at several features in the Lo-Dash/Underscore arsenal that can help save time when writing your next application.
Continue reading →