Book Image

Lo-Dash Essentials

By : Adam Boduch
Book Image

Lo-Dash Essentials

By: Adam Boduch

Overview of this book

Table of Contents (15 chapters)
Lo-Dash Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Design principles


Lo-Dash had some fairly modest goals in the beginning. Underscore appealed to the masses because of the problems it solved and because its API was coherent and easy to use. Lo-Dash's creator, John-David Dalton, wanted to prove that it was possible to implement a great API, such as Underscore's, while delivering consistency and performance across browsers. Additionally, Lo-Dash has the freedom to implement new features that aren't welcomed by Underscore.

In order to prove his point, John-David had to establish some guiding design principles. Some of the founding principles are still around today, while others have morphed into something else to better support programmers who use the library and contribute to it. Lo-Dash is nothing if not adaptable to change.

Function compilation to base functions

The earlier versions of Lo-Dash utilized a technique called function compilation. This means that there were templates of a skeleton function. Then Lo-Dash would fill them and create...