Sequitur is a simple flow control library for modern Node.js (^4.0.0) which offers sequential and parallel execution and resume-on-error functionality.
npm install sequitur
Example (see tests for more):
'use strict'; const seq = ; ; { let i = -1 next; if typeof _i === 'function' next = _i; else next = _next; i = _i; console; if i > 0 if i % 2 === 0 // If additional arguments are passed after the error value, // they will provided to the next function in the chain if `resume` is called. // Passing only the error causes `resume` to use the previous arguments. return ; if i % 3 === 0 return ; ;}