npm.io
1.0.0 • Published 7 years ago

top-level-async

Licence
ISC
Version
1.0.0
Deps
0
Size
739 B
Vulns
0
Weekly
0

Top Level Async

Lets you run an async function at the top level of a node app.

Because people are too afraid of writing ;((async()=>{ /* code */ })());

Install

npm i --save top-level-async

Usage

topLevelAsync = require('top-level-async');
topLevelAsync(async()=>{
    await someFunc();
    console.log('we did it! good job everyone!')
});