UNPKG

qjs

Version:

Use the await keyword with Q promises to tame your async code

13 lines 368 B
require('../../').compile(module, function () { var obj = { result: 'foo' }; module.exports.inBody = function () { with (obj) { return yield(Q.resolve(result)) + 'bar'; } }; module.exports.inParameter = function () { with (yield(Q.delay(obj, 1))) { return result + 'bar'; } }; });