Skip to content

Instantly share code, notes, and snippets.

@russellhaering
Created June 6, 2011 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russellhaering/1010749 to your computer and use it in GitHub Desktop.
Save russellhaering/1010749 to your computer and use it in GitHub Desktop.
I hate jslint
function returnReadyJob(res, job) {
function onReady() {
job.removeListener('ready', onReady);
job.removeListener('error', onError);
returnSwiz(res, job);
}
function onError(err) {
job.removeListener('ready', onReady);
job.removeListener('error', onError);
returnError(res, 404, err);
}
job.on('ready', onReady);
job.on('error', onError);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment