JavaScript port of Scala Future written with TypeScript. See documentation for more information.
This library uses ES6 promise. So you need modern browser, io.js. If you want to use it with node.js, please ensure your node.js version is upper than 0.12.0. See ES6 compatibility table for more information.
npm install sfuture
git clone https://github.com/sgkim126/sfuture.git
cd sfuture
or
wget https://github.com/sgkim126/sfuture/archive/{version}.tar.gz
tar -xf {version}.tar.gz
cd {version}
make
Now you have {path to sfuture}/src/sfuture.js
. Use it.
sfuture is written with TypeScript, checks style with tslint, runs tests with mocha and checks test coverage with istanbul. npm test
command tests them all.
There are two commands to compile.
One is make build
(or just make
) it only compiles future.js with declaration file.
Another is make all
. It build future.js and build all tests.
make lint
All configuration about lint is in .tslintrc.json
make test
Currently, sfuture ensures 100% test coverage.
make cover
make doc
- Fix a bug on find function.
- Use es6 promise instead of mpromise.
- Any type can be reject reason.
- Change the signature of transform method
- Implement withFilter, fromTry,
- Rename create to apply
- Implement find, zip, recoverWith, foreach and fallbackTo
- Implement firstCompletedOf, fold, reduce, traverse, and collect.
- Publish only the compiled files
- Change Future.sequence() signature to take an array of futures instead of rest parameters
- Change onComplete method to use node style callback
- Change onComplete signature
- Implement some of methods