Skip to content

TypeScript Rewrite

Compare
Choose a tag to compare
@ThisseasX ThisseasX released this 12 Apr 14:40
· 21 commits to master since this release

2.0.2

2020-04-12

Rewritten in TypeScript and bundled with Rollup.

Features

  • Map cases to results.
  • Map multiple cases to the same result.
  • Customize the equality function used to produce a match, either at case declaration, or at the time of input.
  • Refer from one case to another by ref-ing its index.
  • Refer from one case to another by use-ing its when value.
  • Leverage the lazy nature of functions to compute a result only when needed, and not at the time of the case declaration.
  • If a function is intended to be returned as is, it can be put under the eager key.
  • Written in TypeScript and bundled with Rollup, featuring:
    • A CommonJS module for node.
    • An ES Module for node.