Advertisement
fmunoz92

Untitled

Sep 24th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async.reduce(suppliers, 0, getStorage, function (err, suma_total) {
  2.     console.log(total);
  3. })
  4.  
  5. function getStorage(suma_parcial, supplier, callback) {
  6.   supplier.magia(function(err, espacio_ocupado_por_supplier) {
  7.       callback(err, suma_parcial + espacio_ocupado_por_supplier);
  8.   });
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement