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

    Keywords

    Install

    npm i @wealthbar/mainjs

    DownloadsWeekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    92.9 kB

    Total Files

    7

    Last publish

    Collaborators

    • alex-wb
    • tanglebones
    • chrisnicola
    • thejf
    • pezillionaire