functions to run in series
array of results from each function execution
// Assumes observer will return a cleanup function
const cleanupStart = observer.on('start', someFunc);
const cleanupStop = observer.on('stop', someFunc);
const cleanupError = observer.on('error', someFunc);
const cleanupCleanup = observer.on('cleanup', someFunc);
// ...
runInSeries([cleanupStart, cleanupStop, cleanupError, cleanupCleanup]);
Runs functions in series, waiting for each to complete before running the next. This is a synchronous operation.