code
exit(code)
// Stop with an error exit(1); // Stop with a success exit(0);
This is similar to process.exit but I found having a convenience wrapper for it made mocking calls in tests easier.
process.exit