code: function Router(options) {
    if ( !(this instanceof Router) ) {
      return new Router(options);
    }
    options = options || {};
    var self = this;
    this.routes = [];
    this.caseSensitive = options.caseSensitive;
    this.strict = options.strict;
    this.connect = connect();
    this.middleware = function (req, res, next){
      dispatch(self, req, res, next);
    };
    this.eventHandlers = {
      404 : function(req, res){
        res.writeHead(404);
        res.end('Not found');
      },
      405 : function(req, res, resource){
        res.setHeader('Allow', allowHeader(self, resource));
        res.writeHead(405);
        res.end('Not allowed');
      },
      'HEAD' : function(req, res, resource){
        if (!resource.GET){
          return self.eventHandlers[405](req, res, resource);
        }
        // node server suppresses the response output
        // on a HEAD response so we don't need to mute it like this:
        /*
  
        var origResWrite = res.write;
        var origResEnd = res.end;
  
        res.write = function(){
          origResWrite.apply(res, ['']);
        };
        res.end = function(){
          console.log("in muted end()");
          origResEnd.apply(res, ['']);
        };
        */
        // re-distpach as a GET
        req.method = "GET";
        return dispatch(self, req, res, function(){});
      },
      'OPTIONS' : function(req, res, resource){
        var header = allowHeader(self, resource);
        res.setHeader('Allow', header);
        res.writeHead(200);
        res.end('Allow: ' + header);
      }
    };
    // we never tackle 501, because the node server just drops requests
    // with invalid methods
  }
docs: Initialize a new `Router` with the given `options`.
  
  @param {Object} options
  @api private