@wealthbar/mainjs
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

mainjs

Sets the unhandledRejection to log to console.error and provides a wrapper to emulate top-level await for scripts. main will exit after the promise returned from f resolves.

main(f:()=>Promise<any>):void

Runs f and console.logs "done" before exiting the process when the promise resolves. If f throws the exception is sent to console.error.

Readme

Keywords

Package Sidebar

Install

npm i @wealthbar/mainjs

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

92.9 kB

Total Files

7

Last publish

Collaborators

  • nkode0x00
  • tanglebones
  • chrisnicola