Clean promise chains using a pipeline

added by bpwndaddy
6/9/2015 3:17:50 PM

3 Kicks, 238 Views

A few months ago, I started working on a project with a friend of mine who turned me on to the idea of channeling various asynchronous tasks into a pipeline. The idea is that, instead of polluting your local function with a bunch of .thens, you put each of them into a separate module, and then require them into a unifying function that does all the heavy lifting for you.