@sounisi5011/cli-utils-top-level-await
v1.1.3
Published
If the async function fails, set the process exit code to 1 and output the error to stderr
Downloads
23
Readme
@sounisi5011/cli-utils-top-level-await
If the async function fails, set the process exit code to 1 and output the error to stderr.
Installation
npm install @sounisi5011/cli-utils-top-level-await
yarn add @sounisi5011/cli-utils-top-level-await
pnpm add @sounisi5011/cli-utils-top-level-await
Usage
const { awaitMainFn } = require('@sounisi5011/cli-utils-top-level-await');
awaitMainFn(async () => {
// ...
});