function switchRouteMatcher(on, route) {
      var keys = route.keys,
          params = {};

      if (!route.regexp) return null;

      var m = route.regexp.exec(on);
      if (!m) return null;

      for (var i = 1, len = m.length; i < len; ++i) {
        var key = keys[i - 1];

        var val = m[i];

        if (key && val) {
          params[key.name] = val;
        }
      }
      return params;
    }
@param on {string} current url
@param route {Object} route regexp to match the url against
@return {?Object}

@description
Check if the route matches the current url.

Inspired by match in
visionmedia/express/lib/router/router.js.