All Projects → feross → Run Series

feross / Run Series

Licence: mit
Run an array of functions in series

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
Flowa
🔥Service level control flow for Node.js
Stars: ✭ 66 (-70.4%)
Mutual labels:  async, series
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
Rubico
[a]synchronous functional programming
Stars: ✭ 133 (-40.36%)
Mutual labels:  async, series
Bach
Compose your async functions with elegance.
Stars: ✭ 117 (-47.53%)
Mutual labels:  async, series
Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (-26.46%)
Mutual labels:  async, series
Datatable
A go in-memory table
Stars: ✭ 215 (-3.59%)
Mutual labels:  series
Taskbuilder.fs
F# computation expression builder for System.Threading.Tasks
Stars: ✭ 217 (-2.69%)
Mutual labels:  async
Flow
Operation Oriented Programming in Swift
Stars: ✭ 215 (-3.59%)
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
Webcompat.com
Source code for webcompat.com
Stars: ✭ 220 (-1.35%)
Mutual labels:  browser
Aioreactive
Async/await reactive tools for Python 3.9+
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-series travis npm downloads javascript style guide

Run an array of functions in series

series Sauce Test Status

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 a callback(err, result) which it must call on completion with an error err (which can be null) 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].