Skip to content

Latest commit

Β 

History

History
20 lines (15 loc) Β· 603 Bytes

File metadata and controls

20 lines (15 loc) Β· 603 Bytes

πŸšƒ 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'])