Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/Ops"

Index

Functions

firstOf

  • Match the first of these matchers that matches. Equivalent to an Alt (alternate)

    Parameters

    • a: any

      first matcher

    • b: any

      second matcher

    • Rest ...matchers: any[]

      any further matchers: varargs

    Returns MatchingLogic

optional

when

  • when(o: any, matchTest: function, inputStateTest?: function): MatchingLogic
  • Add a condition with a function that verifies that even if we found a match we are happy with it: For example, we like the value it contains. Also capable of vetoing match if the input state is problematic before the potential match

    Parameters

    • o: any
    • matchTest: function
    • Default value inputStateTest: function = () => true

    Returns MatchingLogic

Generated using TypeDoc