News for hackers. Stuff that matters.
Re:Async and Await by romanovcode on Friday June 03, 2016 @06:01AM (#11829304)
Hm, looks interesting. I wonder if it would be possible to monkey-patch the defer itself in something like this. So that defer itself is handling it, but only if you do the the monkey-patching per file and not globally.

   defer = require 'defer-esc'
   await req.get 'https://x.io', defer err, http, res # if err will call cb err
   await req.get "https://x.io?hash=#{res.hash}", defer err, http, res # if err will call cb err
   return cb res

There are no comments on this comment yet.