Flattens an asynchronous call stack into a linear queue using a fluent interface.
var count = 0;var nexter = ;// Whenever next is called in the loop above, this function is called// with a unique state object.// Create predicate based functions using when// Provide the error method for the given request.; // Call go to set everything in motion.
IF ORDER IS INPORTANT
seq begins a sequence of calls. The sequence is completed for each item in the given array in turn and in order. The item can be past down the sequence in the
state variable if necessary. This is the same as if nesting one nexter queue inside another.
// This ends the sequence and jumps back// to the seq() call to handle the next file.// Create predicate based functions using when