A collection of Flow-aware algebraic data types for JavaScript
Run
$ npm install --save phantasy
or
$ yarn add phantasy
Data types can be imported directly from the phantasy
module
import { Maybe, Task } from 'phantasy';
Support for Flow is included for all types and should automatically integrate with existing projects.
Simple monadic container values without any special behaviors
Monad for safely handling nullable values
Monad representing either a success or an error value
Monad that represents computations that can read data from a context
Monad that represents computations that can write data to a context
Monad that represents computations that can read and write data from a state
Monad representing synchronous computations which may or may not be effectful
Monad representing asynchronous computations that may succeed or fail and which may or may not be effectful
Monad representing dependency-injected, explicitly-effectful synchronous computations
Monad representing dependency-injected, explicitly-effectful synchronous computations that may succeed or fail
Monad representing dependency-injected, explicitly-effectful asynchronous computations that may succeed or fail