Created
July 18, 2019 18:00
-
-
Save chalu/d0f8fefc6feefd86f02518f455652dc4 to your computer and use it in GitHub Desktop.
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 isFemale = match('gender', is('female')); | |
| const isYoungAdult = match('age', isOrOver(18)); | |
| const canPlayNightOwl = match('age', isUnder(60)); | |
| const ageIsSpecialNumber = match('age', isMultipleOf(4)); | |
| const getSpecialFemaleDevs = chain( | |
| isFemale, | |
| isYoungAdult, | |
| canPlayNightOwl, | |
| ageIsSpecialNumber | |
| ); | |
| const specialFemales = getSpecialFemaleDevs(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment