Created
March 29, 2019 08:50
-
-
Save DejanBelic/100f91fd357eb3a1d9dba9d8d5aba1f9 to your computer and use it in GitHub Desktop.
Chaining filters - when having multiple filters to apply
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const f1 = h => h.title.toLowerCase().includes(title.toLowerCase()); | |
const f2 = d => d.field_category.toLowerCase().includes(category.toLowerCase()); | |
const f3 = e => e.uid.toLowerCase().includes(author.toLowerCase()); | |
const filtered = nodes.filter(f1).filter(f2).filter(f3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment