niftylettuce/express-cdn — pull request #15 by malandrew (2012-08-23 00:14:45+00:00)
Title: Added compatibility with express 3.x.x

I added compatibility with Express 3.x.x by checking if app was typeof function or object. I added a comment just so we know why that line is the way it is. I tried to check if there was an attribute on the app object or its prototype to see that it is an express object, but I didn't find one. Ideally TJ Holowaychuk could add an attribute on the app instance to identity itself as Express and the version number.

I also added a few lines to the usage example. To show people how to use it with both Express 2.x and 3.x, I had to add a dependency on Isaacs' semver lib.