strongloop/express — pull request #2361 by dmoscrop (2014-09-17 17:53:59+00:00)
Title: Fix .use with empty string as path

I don't know if this was ever intended, but prior to 4.9.1 (specifically, https://github.com/strongloop/express/commit/cf41a8f25434bde16ee8606ce12bb699ef9de39e#diff-5372f626ee15242f1e2c6eb31655b4faR168) an empty path "worked". I'm not saying it was a good practice, but the ensuing error message after upgrading to 4.9.1 is a bit unhelpful ("expected function but got Object").

So this 'restores' the tolerance for `app.use` with an empty string as the path. Alternatively, maybe checking if `fn` is an empty string and throwing a more specific error message would be better if the intention was to actually disallow it.