apr-main

4.0.3 • Public • Published

main

Catches a promise error, writes the stacktrace to stderr and exists

Parameters

Examples

import main from 'apr-main';
 
main(async () => 'hello') // writes nothing
main(async () => undefined) // writes nothing
main(async () => { throw new Error('uncaught error') }) // writes the stack trace to stderr and exists

Returns Promise

Package Sidebar

Install

npm i apr-main

Weekly Downloads

7

Version

4.0.3

License

MIT

Last publish

Collaborators

  • ramitos