Class:

new (Object, sequence) → {Sequencer}

Instantiates, Configures and begins execution of a new sequence
Parameters:
Name Type Description
Object Object Object containing each of the following as keys [sequence, args, callback]
sequence Array Array containing Functions or Arrays of Functions for execution
Source:
See:
Returns:
Type
Sequencer
Examples
//Return the sequencer for use elsewhere
//Implied args
var bsync = require('bsync')

var sequence1 = bsync.sequence([
    function1,
    function2
],{
    arg1 : "String",
    arg2 : true
},function(err, data) {
    //Do something with the result of the final output
});
//Implied Args
bsync.sequence([
    function1,
    function2
],{
    arg1 : "String",
    arg2 : true
},function(err, data) {
    //Do something with the result of the final output
});
//Explicit args
bsync.sequence({
    sequence:[
        function1,
        function2
    ],
    args: {
        arg1 : "String",
        arg2 : true
    },
    callback: function(err, data) {
        //Do something with the result of the final output
    }
});