lib/async.js
function getAsyncFncWrapper(asyncFncWrapper){
    if(!asyncFncWrapper) return setImmediate;
    else if(asyncFncWrapper === true) return function(cb){ cb(); };
    else if(!(asyncFncWrapper === setImmediate ||
              asyncFncWrapper === setTimeout ||
              typeof asyncFncWrapper === 'function')){
        
        throw new Error('Wrong argument "asyncFncWrapper", it have to be function, setImmediate, setTimeout, ' +
                        'or true when use default function, or undefined to use setImmediate');
    }
    
    return asyncFncWrapper;
}
function getAsyncFncWrapper(asyncFncWrapper){
    if(!asyncFncWrapper) return setImmediate;
    else if(asyncFncWrapper === true) return function(cb){ cb(); };
    else if(!(asyncFncWrapper === setImmediate ||
              asyncFncWrapper === setTimeout ||
              typeof asyncFncWrapper === 'function')){
        
        throw new Error('Wrong argument "asyncFncWrapper", it have to be function, setImmediate, setTimeout, ' +
                        'or true when use default function, or undefined to use setImmediate');
    }
    
    return asyncFncWrapper;
}
function getAsyncFncWrapper ( asyncFncWrapper ) { if ( ! asyncFncWrapper ) return setImmediate ; else if ( asyncFncWrapper === true ) return function ( cb ) { cb ( ) ; } ; else if ( ! ( asyncFncWrapper === setImmediate || asyncFncWrapper === setTimeout || typeof asyncFncWrapper === 'function' ) ) { throw new Error ( 'Wrong argument "asyncFncWrapper", it have to be function, setImmediate, setTimeout, ' + 'or true when use default function, or undefined to use setImmediate' ) ; } return asyncFncWrapper ; }
/*
helper for getting asyncFncWrapper
@param {Object} asyncFncWrapper Description
@returns {Object}  Description
/ * helper for getting asyncFncWrapper