apr-main
v4.0.3
Published
Catches a promise error, writes the stacktrace to stderr and exists
Downloads
392
Maintainers
Readme
main
Catches a promise error, writes the stacktrace to stderr and exists
Parameters
input
Promise
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