Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 Promise.promisifyAll(tinder);
  2.                          
  3.                         var timer = 1000;
  4.                         var current = Promise.resolve();
  5.  
  6.                         Promise.map(array, function (item) {
  7.                             current = current.then(function () {
  8.                                 console.log(item.name);
  9.                              
  10.                                 return tinder.like(item.id)
  11.  
  12.                             }).then(function (responseAndBody) {
  13.  
  14.                                             process.stdout.write("call complete");
  15.                                             return true;
  16.  
  17.                                         })
  18.                                 });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement