feross / Run Series
Licence: mit
Run an array of functions in series
Stars: ✭ 223
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Run Series
Storage Based Queue
Javascript queue library with persistent storage based queue mechanism for the browsers environments. Specially designed for offline.
Stars: ✭ 33 (-85.2%)
Mutual labels: async, browser
Await Of
await wrapper for easier errors handling without try-catch
Stars: ✭ 240 (+7.62%)
Mutual labels: async, browser
Run Parallel
Run an array of functions in parallel
Stars: ✭ 324 (+45.29%)
Mutual labels: async, browser
Run Waterfall
Run an array of functions in series, each passing its results to the next function
Stars: ✭ 83 (-62.78%)
Mutual labels: async, browser
Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (-26.46%)
Mutual labels: async, series
Taskbuilder.fs
F# computation expression builder for System.Threading.Tasks
Stars: ✭ 217 (-2.69%)
Mutual labels: async
Appifier
Node.js library which turns website into Electron app.
Stars: ✭ 216 (-3.14%)
Mutual labels: browser
React Organism
Dead simple React state management to bring pure components alive
Stars: ✭ 219 (-1.79%)
Mutual labels: async
Txtorcon
Twisted-based asynchronous Tor control protocol implementation. Includes unit-tests, examples, state-tracking code and configuration abstraction.
Stars: ✭ 215 (-3.59%)
Mutual labels: async
Isomorphic Ws
Isomorphic implementation of WebSocket (https://www.npmjs.com/package/ws)
Stars: ✭ 215 (-3.59%)
Mutual labels: browser
Loadjs
A tiny async loader / dependency manager for modern browsers (899 bytes)
Stars: ✭ 2,507 (+1024.22%)
Mutual labels: async
Neomake
Asynchronous linting and make framework for Neovim/Vim
Stars: ✭ 2,512 (+1026.46%)
Mutual labels: async
Web Worker Proxy
A better way of working with web workers
Stars: ✭ 218 (-2.24%)
Mutual labels: browser
Run an array of functions in series
install
npm install run-series
usage
series(tasks, [callback])
Run the functions in the tasks
array in series, each one running once the previous
function has completed. If any functions in the series pass an error to its callback, no
more functions are run, and callback
is immediately called with the value of the error.
Otherwise, callback
receives an array of results when tasks
have completed.
arguments
-
tasks
- An array containing functions to run, each function is passed acallback(err, result)
which it must call on completion with an errorerr
(which can benull
) and an optional result value. -
callback(err, results)
- An optional callback to run once all the functions have completed. This function gets a results array containing all the result arguments passed to the task callbacks.
example
var series = require('run-series')
series([
function (callback) {
// do some stuff ...
callback(null, 'one')
},
function (callback) {
// do some stuff ...
callback(null, 'two')
}
],
// optional callback
function (err, results) {
// the results array will equal ['one','two']
})
This module is basically equavalent to
async.series
, 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.
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].