exit-hook.js
function exitHook (context, func) {
	if (!func) {
		func = context;
		context = func;
	}

	if (typeof func === 'function') {
		subs.push([func, context])
	}

	return exitHook;
}
function exitHook (context, func) {
	if (!func) {
		func = context;
		context = func;
	}

	if (typeof func === 'function') {
		subs.push([func, context])
	}

	return exitHook;
}
function exitHook ( context , func ) { if ( ! func ) { func = context ; context = func ; } if ( typeof func === 'function' ) { subs . push ( [ func , context ] ) } return exitHook ; }
Adds a new function to execute when the application is exiting.
Adds a new function to execute when the application is exiting .