The final chapter of this book looks at the internal design of key Lo-Dash components. All previous chapters focused on the external-facing aspects of the library. Now that we're well-versed in what's possible with Lo-Dash, it's time to see what's under the hood. This isn't an in-depth walkthrough of the Lo-Dash source code. The curious reader should by all means look at the code though. We will touch the most important pieces of the implementation of Lo-Dash. These are what make Lo-Dash perform not only fast but also predictably.
With these designs in mind, we'll spend the remaining sections of this chapter looking at some Lo-Dash code that could be improved. Understanding some of the design motivations will hopefully guide you in making your design decisions.
In this chapter, we will cover the following topics:
Design principles
Improving performance
Lazy evaluation
Caching things