Generic wrappers and chains

With generic functions under our belts, it's time to turn our attention to Lo-Dash wrapper instances and create generic function call chains. Chains are useful when you're stuck and you need a quick way out of a tricky programming situation, but they're also useful in the generic sense. That is, you can compose chains of functionality that are general enough to apply in a variety of contexts.

Generic filters

Let's start by taking a look at generic filters and how they can be utilized in our functions. Filters are especially suitable for chained function calls since they can be stitched together by applying a filter after a preceding filter. There are often some kinds of sorting or other constraints that take place at ...

Get Lo-Dash Essentials now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.