igogo
TypeScript icon, indicating that this package has built-in type declarations

1.9.0 • Public • Published

🦄
igogo
Travis badge Greenkeeper badge

Fast Either and Maybe from Fantasy Land with Flow and TypeScript support

Install

npm

npm install --save igogo

Yarn

yarn add igogo

API

import {
 type Maybe,
 type Either,
 Just,
 Nothing,
 fromNullable,
 opt,
 when,
 nothing,
 Left,
 Right,
 ifElse,
} from 'igogo'
 
function Just<T>(value: T): Maybe<T>
function Nothing<T>(value: T): Maybe<T>
function fromNullable<T>(value: ?T): Maybe<T>
function opt<T>(value: ?T): Maybe<T>
function when<V>(condition: boolean, value: V): Maybe<V>
function when<V>(predicate: mixed => boolean, value: V): Maybe<V>
 
const nothing: Maybe<any>
 
function Left<L, R>(left: L): Either<L, R>
function Right<L, R>(right: R): Either<L, R>
function ifElse<L, R>(condition: boolean, right: R, left: L): Either<L, R>

Package Sidebar

Install

npm i igogo

Weekly Downloads

4

Version

1.9.0

License

MIT

Unpacked Size

63.8 kB

Total Files

17

Last publish

Collaborators

  • bigslycat-profile