@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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @wealthbar/mainjs

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

92.9 kB

Total Files

7

Last publish

Collaborators

  • nkode0x00
  • tanglebones
  • chrisnicola