0.2.2 • Published 9 years ago
@fand/async-node v0.2.2
async-node
You can write awaits on top level!

Install
npm i -g @fand/async-node
Usage
async-node runs Node.js scripts wrapping them with async function.
$ cat foo.js
const res = await Promise.resolve('RESOLVED!');
console.log(res);
$ async-node foo.js
RESOLVED!wrap-with-async will output transformed script to stdout.
$ wrap-with-async foo.js > bar.js
$ cat bar.js
(async function () { const res = await Promise.resolve('RESOLVED!');
console.log(res);
})().catch(e => {})LICENSE
MIT