Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

waterfall.js 357B

1234567891011121314151617
  1. /*
  2. * examples/waterfall.js: simple waterfall example
  3. */
  4. var mod_vasync = require('..');
  5. mod_vasync.waterfall([
  6. function func1(callback) {
  7. setImmediate(function () {
  8. callback(null, 37);
  9. });
  10. },
  11. function func2(extra, callback) {
  12. console.log('func2 got "%s" from func1', extra);
  13. callback();
  14. }
  15. ], function () {
  16. console.log('done');
  17. });