Skip to content

Instantly share code, notes, and snippets.

@spiermar
Forked from tj/ignore.js
Last active August 29, 2015 14:11
Show Gist options
  • Save spiermar/bf3b7d66f4c974143644 to your computer and use it in GitHub Desktop.
Save spiermar/bf3b7d66f4c974143644 to your computer and use it in GitHub Desktop.
function ignore(paths, fn) {
return function(req, res, next) {
if (~paths.indexOf(req.url)) {
next();
} else {
fn(req, res, next);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment