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

Summary


This chapter introduced you to the map/reduce programming model and how Lo-Dash tools can help to realize it in your application. First, we examined mapping collections, including how to choose which properties get included and how to perform calculations. We then moved on to mapping objects. Keys have an important role in how objects get mapped to new objects and collections. There are also methods and functions to consider when mapping.

The second part of the chapter covered reducing, including how to sum items, how to transform objects, and how to formulate generic callback functions that can be used in a variety of contexts. The chapter closed with a brief look at what chaining map/reduce operations together looks like.

Map/reduce is an important topic because Lo-Dash supports many variations of the programming model. It's now time to expand on the chaining concept, and it turns out that there's a lot more than just map/reduce functions that can be glued together.