0.2.0 • Published 11 years ago

futurism v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
11 years ago

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.