futurism

Fast, sorta-sane and impure monadic Promise implementation.

npm install futurism
8 downloads in the last month

Futurism

unstable Build Status Dependencies Status

A fast, sorta sane and impure implementation of monadic Promises for JavaScript. No Promises/A+ bullshit or compatibility.

Example

var Future = require('futurism')
var a = new Future()
var b = a.map(function(v){ return v + 1 })

a.fulfill(10)
b.map(function(v) { console.log('ok:', v) })
 .orElse(function(v){ console.log('failed:', v) })

// => ok: 11

Installing

Just grab it from NPM:

$ npm install futurism

Test

On Node:

$ npm test

Licence

MIT.

npm loves you