Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

or-else

orlovedev9MIT0.1.0TypeScript support: included

A set of tools for capturing and maintaining multiple application flows.

readme

||else

Maintainability codecov

code style: prettier versioning: or-release

A set of tools for capturing and maintaining multiple application flows.

Contents

  • Switch works like the ordinary switch: 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 previous Switch but it accepts the value to be matched against provided prefixes in a match method. The cases may be matched against a value or with a function.
  • Either is a monad with a Left and a Right 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