nl_tokens: 複数タスクを配列でaddするメソッドです。 @memberof Bucks @instance @param { Array } tasks タスクの配列です。タスクの形式は addと同様です @return { Bucks } @example var t1 = function t1 ( err res next ) { return t1 ; } ; var t2 = funciton t2 ( err res next ) { return t2 ; } ; new Bucks . waterfall ( [ t1 t2 ] ) . end ( function finish ( err ress ) { // ress = > [ t1 t2 ] } ) ;
pl_tokens: function waterfall ( tasks ) { if ( ! isArray ( tasks ) ) { throw new Error ( 'tasks is not array.' ) ; } if ( isArrayEmpty ( tasks ) ) { return this . add ( function passEmpty ( err , res , next ) { next ( null , [ ] ) ; } ) ; } // normalize and add each task for ( var i = 0 , l = tasks . length ; i < l ; i ++ ) { tasks [ i ] = this . _normalizeTask ( tasks [ i ] ) ; this . <mask> ( tasks [ i ] ) ; } return this ; }