packages/Chatdown/bin/chatdown.js
function exitWithError(error) {
    if (error instanceof Error) {
        process.stderr.write(chalk.red(error));
    } else {
        help();
    }
    process.exit(1);
}
function exitWithError(error) {
    if (error instanceof Error) {
        process.stderr.write(chalk.red(error));
    } else {
        help();
    }
    process.exit(1);
}
function exitWithError ( error ) { if ( error instanceof Error ) { process . stderr . write ( chalk . red ( error ) ) ; } else { help ( ) ; } process . exit ( 1 ) ; }
Utility function that exist the process with an
optional error. If an Error is received, the error
message is written to stdout, otherwise, the help
content are displayed.

@param {*} error Either an instance of Error or null
Utility function that exist the process with an optional error . If an Error is received the error message is written to stdout otherwise the help content are displayed .