0.1.2 • Published 5 years ago

simpleemaybee v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

simpleemaybee

simpleemaybee can help you with optional arguments, error handling, and records with optional fields.

installation

$ yarn add simpleemaybee

usage

create

const j = just(10);
const n = nothing();

fromNullable(10); // just(10)
fromNullable(null); // nothing()

type guard

isJust(j); // true
isNothing(n); // true

function

const double = (n: number) => n * 2;

map(double)(j); // just(20)
map(double)(n); // nothing()
1.0.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago