# riasfp

> Provides Result and Option monads and unit const based on record type

Latest version **1.0.0** (published 2019-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install riasfp
pnpm add riasfp
yarn add riasfp
bun add riasfp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-03-19 |
| First published | 2019-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Przemyslaw Sowinski |
| Maintainers | psowinski |

## Links

- npm: https://www.npmjs.com/package/riasfp
- Repository: https://github.com/psowinski/riasfp
- npm.io page: https://npm.io/package/riasfp

## Dependencies (1)

- [immutable](https://npm.io/package/immutable.md) ^4.0.0-rc.12

## Recent versions

- 1.0.0 (latest) — 2019-03-19

## README

### Functional programming library integrated with immutable.js

Provides Result and Option monads and unit const based on record type

### Result:

import { ok, error } from 'riasfp'

ok(1); // Ok(1)\
ok(undefined); //Error exception\
ok(null); //Error exception

error('some value'); // Error('some value')\
error(undefined); //Error exception\
error(null); //Error exception

methods:\
.map(function(okValue) {...})\
.bind(function(okValue) {...})\
.tee(function(okValue) {...})\
.match({ok: function(okValue) {...}, error: function(errorValue) {...})
.mapError(function(errorValue) {...})\
.bindError(function(errorValue) {...})\
.teeError(function(errorValue) {...})\
.isOk()\
.isError()\
.toString()

### Option:

import { some, none } from 'riasfp'

none; //None

some(1); //Some(1)\
some(undefined); //Error exception\
some(null); //Error exception

option(1); //Some(1)\
option(undefined); //none\
option(null); //none

methods:\
.map(function(okValue) {...})\
.bind(function(okValue) {...})\
.tee(function(okValue) {...})\
.match({some: function(value) {...}, none: function() {...})\
.isOk()\
.isError()

### Unit:

import { unit } from 'riasfp'

unit; //Unit

---
_Source: https://npm.io/package/riasfp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
