All Projects → feross → Run Waterfall

feross / Run Waterfall

Licence: mit
Run an array of functions in series, each passing its results to the next function

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Run Waterfall

Run Parallel
Run an array of functions in parallel
Stars: ✭ 324 (+290.36%)
Mutual labels:  async, browser
Await Of
await wrapper for easier errors handling without try-catch
Stars: ✭ 240 (+189.16%)
Mutual labels:  async, browser
Run Series
Run an array of functions in series
Stars: ✭ 223 (+168.67%)
Mutual labels:  async, browser
Storage Based Queue
Javascript queue library with persistent storage based queue mechanism for the browsers environments. Specially designed for offline.
Stars: ✭ 33 (-60.24%)
Mutual labels:  async, browser
Beef Over Wan
Browser Exploitation Framework is a Open-source penetration testing tool that focuses on browser-based vulnerabilities .This Python Script does the changes Required to make hooked Linked Accessible Over WAN .So anyone can use this framework and Attack Over WAN without Port Forwarding [NGROK or any Localhost to Webhost Service Required ]
Stars: ✭ 82 (-1.2%)
Mutual labels:  browser
String To Stream
Convert a string into a stream (streams2)
Stars: ✭ 75 (-9.64%)
Mutual labels:  browser
Suave
Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
Stars: ✭ 1,196 (+1340.96%)
Mutual labels:  async
Pfun
Functional, composable, asynchronous, type-safe Python.
Stars: ✭ 75 (-9.64%)
Mutual labels:  async
Pollyjs
Record, Replay, and Stub HTTP Interactions.
Stars: ✭ 9,484 (+11326.51%)
Mutual labels:  browser
Kotlinx Browser
Kotlin browser API
Stars: ✭ 83 (+0%)
Mutual labels:  browser
Radon
Object oriented state management solution for front-end development.
Stars: ✭ 80 (-3.61%)
Mutual labels:  async
Noduino
JavaScript and Node.js Framework for controlling Arduino with HTML and WebSockets
Stars: ✭ 1,202 (+1348.19%)
Mutual labels:  browser
Front End Resource Collection
前后端日常总结
Stars: ✭ 82 (-1.2%)
Mutual labels:  browser
Sming
Sming - Open Source framework for high efficiency native ESP8266 development
Stars: ✭ 1,197 (+1342.17%)
Mutual labels:  async
Testcafe
A Node.js tool to automate end-to-end web testing.
Stars: ✭ 9,176 (+10955.42%)
Mutual labels:  browser
Keshi
A better in-memory cache for Node and the browser
Stars: ✭ 75 (-9.64%)
Mutual labels:  async
Kotlin Futures
A collections of extension functions to make the JVM Future, CompletableFuture, ListenableFuture API more functional and Kotlin like.
Stars: ✭ 79 (-4.82%)
Mutual labels:  async
Dns
Async DNS resolution for PHP based on Amp.
Stars: ✭ 82 (-1.2%)
Mutual labels:  async
Term Web
📟 A simple Terminal UI that run on the web
Stars: ✭ 77 (-7.23%)
Mutual labels:  browser
Macho Browser
Mac browser for Mach-O binaries (macOS, iOS, watchOS, and tvOS)
Stars: ✭ 77 (-7.23%)
Mutual labels:  browser

run-waterfall travis npm downloads javascript style guide

Run an array of functions in series, each passing its results to the next function

waterfall Sauce Test Status

install

npm install run-waterfall

usage

waterfall(tasks, [callback])

Runs the tasks array of functions in series, each passing their results to the next in the array. However, if any of the tasks pass an error to their own callback, the next function is not executed, and the main callback is immediately called with the error.

arguments
  • tasks - An array of functions to run, each function is passed a callback(err, result1, result2, ...) it must call on completion. The first argument is an error (which can be null) and any further arguments will be passed as arguments in order to the next task.
  • callback(err, [results]) - An optional callback to run once all the functions have completed. This will be passed the results of the last task's callback.
example
var waterfall = require('run-waterfall')

waterfall([
  function (callback) {
    callback(null, 'one', 'two')
  },
  function (arg1, arg2, callback) {
    // arg1 now equals 'one' and arg2 now equals 'two'
    callback(null, 'three')
  },
  function (arg1, callback) {
    // arg1 now equals 'three'
    callback(null, 'done', 'wohoo')
  }
], function (err, result1, result2) {
   // result1 now equals 'done'
   // result2 now equals 'wohoo'
})

This module is basically equavalent to async.waterfall, but it's handy to just have the functions you need instead of the kitchen sink. Modularity! Especially handy if you're serving to the browser and need to reduce your javascript bundle size.

Works great in the browser with browserify!

see also

license

MIT. Copyright (c) Feross Aboukhadijeh.

Image credit: Waterfall designed by Luis Prado

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].