Skip to content
This repository has been archived by the owner on Sep 9, 2023. It is now read-only.

tkuminecz/phantasy

Repository files navigation

phantasy

Build Status Coverage Status

A collection of Flow-aware algebraic data types for JavaScript

Installation

Run

$ npm install --save phantasy

or

$ yarn add phantasy

Usage

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.

Data Types

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

About

Flow-aware algebraic data types for JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published