Table of contents

  1. MatchUtil
  2. SwitchUtil

source


MatchUtil

Propreties:

armfun(condition: any, result: any):MatchUtil

Checks if the scrutinee is equal to the condition (==)

see definitions: MatchUtil

arm_less_eqfun(condition: any, result: any):MatchUtil

Checks if the scrutinee is less than or equal to the condition (<=)

see definitions: MatchUtil

arm_less_thanfun(condition: any, result: any):MatchUtil

Checks if the scrutinee is less than to the condition (<)

see definitions: MatchUtil

arm_more_eqfun(condition: any, result: any):MatchUtil

Checks if the scrutinee is more than or equal to the condition (>=)

see definitions: MatchUtil

arm_more_thanfun(condition: any, result: any):MatchUtil

Checks if the scrutinee is more than to the condition (>)

see definitions: MatchUtil

collapsefun():any

Collapses the entire match arm, returning either a result, the fallback if no match was found or nothing

defaultfun(result: any):MatchUtil

If none of the arms have a match, it will fallback to this result

see definitions: MatchUtil

Methods:


SwitchUtil

Propreties:

casefun(condition: any, result: fun():any):SwitchUtil

Checks if the scrutinee is equal to the condition (==)

see definitions: SwitchUtil

case_less_eqfun(condition: any, result: fun():any):SwitchUtil

Checks if the scrutinee is less than or equal to the condition (<=)

see definitions: SwitchUtil

case_less_thanfun(condition: any, result: fun():any):SwitchUtil

Checks if the scrutinee is less than to the condition (<)

see definitions: SwitchUtil

case_more_eqfun(condition: any, result: fun():any):SwitchUtil

Checks if the scrutinee is more than or equal to the condition (>=)

see definitions: SwitchUtil

case_more_thanfun(condition: any, result: fun():any):SwitchUtil

Checks if the scrutinee is more than to the condition (>)

see definitions: SwitchUtil

collapsefun()

Evaluates the found case, if no case was found then evaluate the fallback if it is provided

defaultfun(result: fun():any):MatchUtil

If none of the arms have a match, it will fallback to this result

see definitions: MatchUtil

Methods: