I think the best thing to do is to add this kind of wrapper close to the js head https://github.com/hmalphettes/async/commit/f3bde23c35b64bf1856c0d5a7d193c91bced4f51