UNPKG

nodent

Version:

NoDent - Asynchronous Javascript language extensions

22 lines (17 loc) 374 B
async function pause() { setImmediate(function(){ async return }) ; } async function half(x) { return x/2 ; } async function otherHalf(x) { await pause() ; return x/2 ; } async function test() { var a = half(10) ; var b = otherHalf(10) ; var f = (await a + await a)===10 && (await b + await b)===10 ; return f ; } module.exports = test ;