||else
A set of tools for capturing and maintaining multiple application flows.
Contents
Switch
works like the ordinaryswitch
: you provide the cases and the default value, it jumps in to the proper case or falls through to the default result. The cases may be matched against a value or with a function.LazySwitch
is like the previousSwitch
but it accepts the value to be matched against provided prefixes in amatch
method. The cases may be matched against a value or with a function.Either
is a monad with aLeft
and aRight
state that can be used for capturing uncommon behaviour or maintaining two flows of application execution at once.
Installation
yarn add or-else
or
npm i -S or-else
Examples
TBD