SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function recursive(folder){
  2.     each(folder, function(i,v)){
  3.         promises.push(new Promise());
  4.        
  5.         if(!folder.children){
  6.             Promise.resolve();
  7.         }
  8.         recursive(v);
  9.     });
  10.     Promise.all(promises).then(){
  11.         //something?
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top