resulty
Version:
A disjunction implementation in TypeScript.
31 lines (19 loc) • 646 B
Markdown
# resulty
[](https://travis-ci.org/kofno/resulty)
[](https://github.com/semantic-release/semantic-release)
A disjunction implementation in TypeScript.
# install
> npm install --save resulty
> yarn add resulty
# usage
import { ok, err } from 'resulty';
function parse(s) {
try {
return ok(JSON.parse(s));
}
catch(e) {
return err(e.message);
}
}
# docs
[API](https://kofno.github.io/resulty)