I know this is really old question, but if you are reading this is because you need a state-of-the-art answer:
process.exit();