UNPKG
qjs
Version:
latest (0.0.2)
0.0.2
0.0.1
0.0.0
Use the await keyword with Q promises to tame your async code
ForbesLindesay/QJS
qjs
/
test
/
fixtures
/
with.js
13 lines
•
368 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
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'
; } }; });