https://github.com/runk/connect-jade-static/blob/master/index.js#L54
I think it would make sense to perform a simple string operation here:
var urlpath = parsed.pathname.replace(/html$/, 'jade').replace(opts.baseUrl, '');
As far as I understood - the logic is to replace the string from the end. It can be achieved in more efficient ways :) I'll create a PR later