Skip to content

Latest commit

 

History

History

functional-predicates

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

🚃 Functional Predicates

Composable functional array predicates

#data #functional

Open in StackBlitz

const containsOnlyFloridaOrTexas = contains(
  or(
    only(['Miami', 'Orlando']),
    only(['Austin', 'Dallas'])
  )
)
true === containsOnlyFloridaOrTexas(['Miami'])
false === containsOnlyFloridaOrTexas(['Miami', 'LA'])