Hacker News new | past | comments | ask | show | jobs | submit login

As wycats says, this indeed supported by good JS promises. I talked a bit more about the situation in my promise-tests documentation:

https://github.com/domenic/promise-tests#returning-a-promise...

Unfortunately Promises/A omits this, so I didn't address it directly, although I did sneak it into the example code with the `return expandUrlUsingTwitterApi(mostRecentShortUrl);` line.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: