DigitMagazine

Async code for Yeoman

Aug 21st, 2017
174
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None
  1. asyncFunction(){
  2. let done = this.async();
  3. someOldFunction((err, result) => {
  4. if(err){
  5. throw err;
  6. }
  7. done(result);
  8. });
  9. }
RAW Paste Data Copied