futurism

Fast, sorta-sane and impure monadic Promise implementation.

Please use data.future instead
Last updated 7 years ago by killdream .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install futurism 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.2.0                                ...           latest (7 years ago)

2 Versions

  • 0.2.0 [deprecated]           ...           7 years ago
  • 0.1.0 [deprecated]           ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |