docs: function Router () {
    if (!(this instanceof Router)) return new Router();
  
    var index = 0;
  
    /**
     * @api public
     */
  
    function router () {
      router.route.apply(router, slice.call(arguments));
    }
  
    router.__proto__ = Router.prototype;
  
    /**
     * Inc the index
     *
     * @api private
     * @return Number
     */
  
    router.index = function () {
      return index++;
    };
  
    /**
     * Pushes the socket and arguments through the middleware
     *
     * @api public
     * @param {Error} err *optional
     * @param {Socket} socket
     * @param {Array} args
     * @param {Function} cb
     */
  
    router.route = function () {
      var args = slice.call(arguments);
      var name = '*';
      var err = null;
      var cb = function () { console.warn('default callback', slice.call(arguments)); };
      var end = function (err) { 
        if (cb.called) return;
        cb.called = new Date(); 
        cb.apply(cb, [err ? err : null].concat(args)); 
      };
  
      if ('string' === typeof args[0]) name = args.shift();
      if ('object' === typeof args[0] && args[0] instanceof Error) err = args.shift();
      if ('function' === typeof args[args.length - 1]) cb = args.pop();
  
      var i = 0, path = router.getPath(name), len = path.length;
  
      debug('got path the length is %s', len);
  
      (function step (err) {
        
        if (cb.called) return;
  
        debug('current step %s of %s', i+1, len);
  
        function next (err) {
          if (++i >= len) {
            end(err);
          }
          else {
            step(err);
          }
        }
  
        var fn = path[i];
        if (!fn) return next();
  
        try {
          if (err) {
            if (fn.err) {
              if (fn instanceof Router) {
                fn.route.apply(fn,[name, err].concat(args).concat(next).concat(end));
              }
              else {
                fn.apply(fn, [err].concat(args).concat(next).concat(end));
              }
            }
            else {
              next(err);
            }
          }
          else {
            if (fn.err) {
              next();
            }
            else {
              if (fn instanceof Router) {
                fn.route.apply(fn,[name].concat(args).concat(next).concat(end));
              }
              else {
                fn.apply(fn, args.concat(next).concat(end));
              }
            }
          }
        }
        catch(e) {
          debug('caught error %s', e);
          debug('the fn causing problems', fn);
          console.error(e.stack);
          next(e);
        }
        
      })(err);
  
    };
    
    return router;
  
  }