Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No built-in help with native promises, but with something like Bluebird you'd prefer:

   something().then(() => {  
      return Promise.delay(1000).then(() => {  
        whoops_not_a_function();  
      });  
   }).catch(() => {  
      // whoops_not_a_function is not defined  
   });
...or write Promise_delay yourself on top of native promises (but really just use Bluebird).


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: