You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@wealthbar/mainjs

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wealthbar/mainjs

top level main function to wrap an async function

1.1.0
latest
npm
Version published
Weekly downloads
2
100%
Maintainers
4
Weekly downloads
 
Created
Source

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

main

FAQs

Package last updated on 26 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts