Every line of 'async waterfall example' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
45 function _waterfall (steps, done) { 46 function next () { 47 var d = once(done); 48 return once(function callback () { 49 var args = atoa(arguments); 50 var step = steps.shift(); 51 if (step) { 52 if (handle(args, d)) { return; } 53 args.push(next()); 54 cb(step, args); 55 } else { 56 cb(d, arguments); 57 } 58 }); 59 } 60 next()(); 61 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code