Fluture

fluture

🦋 Fantasy Land compliant (monadic) alternative to Promises.

Fluture offers a control structure similar to Promises, Tasks, Deferreds, and what-have-you, the lib just terms it Futures.

Futures represent the value arising from the success or failure of an asynchronous operation they are lazy and adhere to the monadic interface.

Feature comparsion of fluture like libs:

Get it: npm install --save fluture

Sample usage:

1
2
3
4
5
6
7
8
9
10
11
import {readFile} from 'fs';
import {node, encase} from 'fluture';

const getPackageName = file =>
  node(done => readFile(file, 'utf8', done))
  .chain(encase(JSON.parse))
  .map(pkg => pkg.name);

getPackageName('package.json')
.fork(console.error, console.log);
//> "fluture"

GIF FTW!

fluture

```

Suggest a module

Comments