Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/allevo/fast-fast-series
https://github.com/allevo/fast-fast-series
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/allevo/fast-fast-series
- Owner: allevo
- License: mit
- Created: 2017-11-28T19:53:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-29T22:23:51.000Z (almost 7 years ago)
- Last Synced: 2024-10-01T21:09:41.050Z (about 1 month ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fast Fast Series
Run as fast as possible your functions
## Install
```bash
npm i --save fast-fast-series
```## Usage
```js
const ffs = require('fast-fast-series')function func1 (obj, next) {
obj.a += 1
setTimeout(next, 0, null, obj)
}function func2 (obj, next) {
obj.b = 6
setTimeout(next, 2, null, obj)
}function func3 (obj, next) {
obj.c = 77
setTimeout(next, 0, null, obj)
}const f = ffs([
func1,
func2,
func3,
function (arg) {
// ok
console.log(arg)
}
], function (err) {
// error case
console.log(err)
})f({ a: 3 })
```Output:
```
{ a: 4, b: 6, c: 77 }
```## License
Licensed under [MIT](./LICENSE).