scripts/helper.js
function ExitHandler( exiting, error ) {
	if( error ) {
		if( error.stack ) {
			console.error( error.stack );
		}

		process.exit( 1 );
	}

	if( exiting.now ) {
		process.exit( 0 ); // exit now
	}

	console.log('\n');

	process.exit( 0 ); // now exit with a smile :)
}
function ExitHandler( exiting, error ) {
	if( error ) {
		if( error.stack ) {
			console.error( error.stack );
		}

		process.exit( 1 );
	}

	if( exiting.now ) {
		process.exit( 0 ); // exit now
	}

	console.log('\n');

	process.exit( 0 ); // now exit with a smile :)
}
function ExitHandler ( exiting , error ) { if ( error ) { if ( error . stack ) { console . error ( error . stack ) ; } process . exit ( 1 ) ; } if ( exiting . now ) { process . exit ( 0 ) ; // exit now } console . log ( '\n' ) ; process . exit ( 0 ) ; // now exit with a smile :) }
Handle exiting of program

@param {null}   exiting - null for bind
@param {object} error   - Object to distinguish between closing events
Handle exiting of program