Summary
In this chapter, we looked at filtering collections in Immutable.js. There are a number of ways to filter collections, including simple value comparisons and comparing the keys of maps. The filter() method is fundamental, and it's up to you to provide it with the appropriate predicate function.
We looked at finding values, which is similar to filtering except that it stops iterating over the collection once a match is found. You then learned about deep collection equality in Immutable.js. This is a common task when building applications, including the ability to perform partial deep equality checks. We also addressed the concept of searching in the opposite direction.
In the next chapter, we'll look at sequences and side-effects. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access