match a route and execute the corresponding callback (obj, obj) -> null original: {path, params parentDefault}
512228
function emit (route, req, res) {
    assert.equal(typeof route, 'string')
    assert.ok(req, 'no req specified')

    if (!req._ssa) {
      assert.ok(res, 'no res specified')
    }

    // handle server init
    if (isReq(req) && isRes(res)) {
      const ssa = createSsa({}, req, res)
      const dft = { node: { cb: [ router._default ] } }
      return router(route, ssa, dft)
    }

    // handle subrouter
    const params = req
    const parentDefault = res
    router(route, params, parentDefault)
  }
1081932
function(context) {

            // Check path
            var path = context.request.urlInfo.pathname;

            if (path.indexOf(this.$.path) === 0) {
                // path matches
                if (this.$.route !== null) {
                    return (new RegExp(this.$.route, "i")).test(path);
                }

                return true;
            }

            return false;
        }
196652
function match(mapEntry, request, route) {
    var keys = [];

    var m = pathToRegexpService.pathToRegexp(mapEntry.path, keys).exec(request.url);

    if (!m) {
      return false;
    }

    if (mapEntry.method != request.method) {
      return false;
    }

    route.params = {};
    route.path = m[0];
    route.handler = mapEntry.handler;

    // Assign url parameters to the request.
    for (var i = 1; i < m.length; i++) {
      var key = keys[i - 1];
      var prop = key.name;
      var val = decodeParam(m[i]);

      if (val !== undefined || !(hasOwnProperty.call(route.params, prop))) {
        route.params[prop] = val;
      }
    }

    request.params = route.params;
    return true;
  }
1238726
function match(routes = [], path) {
  for (var i = 0; i < routes.length; i++) {
    var re = pathRegexps[routes[i].path] || pathToRegexp(routes[i].path);
    pathRegexps[routes[i].path] = re;

    if (re && re.test(path)) {
      return { re, route: routes[i] };
    }
  }

  return false;
}
133833
function(path/*, callback*/) {
    this.lazyRouter();
    var route = this.router.route(path);
    route.all.apply(route, [].slice.call(arguments, 1));
    return this;
  }
1302531
function getParent(model, path) {
    var getParentMethod = inner(model).getParent;
    return getParentMethod ? getParentMethod.call(model, path) : model.parentModel;
}
1090864
function(parent, fileName, callback) {
			fs.stat(parent, function(err, stat) {
				if (err) {
					return callback(err);
				}

				if (stat.isFile()) {
					parent = path.dirname(parent);
				}

				var filepath = path.resolve(parent, fileName);
				callback(null, filepath);
			});
		}
222923
function searchPath(object, path) {
    var currentChild = object;
    var comps = path.toLowerCase().split('/');
    for (var i = 0; i < comps.length; i++) {
        // Search for a child object with a case-insensitive matching key
        var matchingChild = null;
        for (var key in currentChild) {
            if (key.toLowerCase() === comps[i]) {
                matchingChild = currentChild[key];
                break;
            }
        }
        // Didn't find one. :'(
        if (matchingChild === null) {
            return null;
        }
        // Now check this child...
        currentChild = matchingChild;
    }
    return currentChild;
}
982584
function matchesPath(requestedUrl, opts) {
  var paths = !opts.path || Array.isArray(opts.path) ?
    opts.path : [opts.path];

  if (paths) {
    return paths.some(function(p) {
      return (typeof p === 'string' && p === requestedUrl.pathname) ||
        (p instanceof RegExp && !! p.exec(requestedUrl.pathname));
    });
  }

  return false;
}
1364106
function baseMatchesProperty(path, srcValue) {
      if (isKey(path) && isStrictComparable(srcValue)) {
        return matchesStrictComparable(toKey(path), srcValue);
      }
      return function(object) {
        var objValue = get(object, path);
        return (objValue === undefined$1 && objValue === srcValue)
          ? hasIn(object, path)
          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
      };
    }
383408
function findMatch(routes, path) {
      var pathname = PathUtils.withoutQuery(path);
      var query = PathUtils.extractQuery(path);
      var match = null;

      for (var i = 0, len = routes.length; match == null && i < len; ++i) match = deepSearch(routes[i], pathname, query);

      return match;
    }
142276
function(callback)
    {
        var params = util.extend({count:1}, this.params);        
        this.api.doRequest("GET", this.path, params, function(err, res) {
            if (err)
            {
                return callback(err);
            }                    
            callback(null, res.count);
        });
    }
297119
function (childDirName, parentPath, parent) {
		parentPath = parentPath || "";
		if (arguments.length < 3) {
			parent = { 
				config: {},
			};
		}

		return {
			name: childDirName,
			path: path.join(parentPath, childDirName),
			parentRoute: '/' + parentPath,
			config: {},
			parent: parent,
		};
	}
1345707
function inheritedParamsDataResolve(route) {
    var /** @type {?} */ pathToRoot = route.pathFromRoot;
    var /** @type {?} */ inhertingStartingFrom = pathToRoot.length - 1;
    while (inhertingStartingFrom >= 1) {
        var /** @type {?} */ current = pathToRoot[inhertingStartingFrom];
        var /** @type {?} */ parent_1 = pathToRoot[inhertingStartingFrom - 1];
        // current route is an empty path => inherits its parent's params and data
        if (current.routeConfig && current.routeConfig.path === '') {
            inhertingStartingFrom--;
        }
        else if (!parent_1.component) {
            inhertingStartingFrom--;
        }
        else {
            break;
        }
    }
    return pathToRoot.slice(inhertingStartingFrom).reduce(function (res, curr) {
        var /** @type {?} */ params = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_collection__["e" /* merge */])(res.params, curr.params);
        var /** @type {?} */ data = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_collection__["e" /* merge */])(res.data, curr.data);
        var /** @type {?} */ resolve = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_collection__["e" /* merge */])(res.resolve, curr._resolvedData);
        return { params: params, data: data, resolve: resolve };
    }, /** @type {?} */ ({ params: {}, data: {}, resolve: {} }));
}
665610
def resolve(self, path):
        '''
        
        '''
        match = super().resolve(path)
        if match:
            try:
                routing_data = RoutingData(
                    match.kwargs.pop('dmp_app', None) or self.dmp.options['DEFAULT_APP'],
                    match.kwargs.pop('dmp_page', None) or self.dmp.options['DEFAULT_PAGE'],
                    match.kwargs.pop('dmp_function', None) or 'process_request',
                    match.kwargs.pop('dmp_urlparams', '').strip(),
                )
                if VERSION < (2, 2):
                    return ResolverMatch(
                        RequestViewWrapper(routing_data),
                        match.args,
                        match.kwargs,
                        url_name=match.url_name,
                        app_names=routing_data.app,
                    )
                else:
                    return ResolverMatch(
                        RequestViewWrapper(routing_data),
                        match.args,
                        match.kwargs,
                        url_name=match.url_name,
                        app_names=routing_data.app,
                        route=str(self.pattern),
                    )
            except ViewDoesNotExist as vdne:
                # we had a pattern match, but we couldn't get a callable using kwargs from the pattern
                # create a "pattern" so the programmer can see what happened
                # this is a hack, but the resolver error page doesn't give other options.
                # the sad face is to catch the dev's attention in Django's printout
                msg = "◉︵◉ Pattern matched, but discovery failed: {}".format(vdne)
                log.debug("%s %s", match.url_name, msg)
                raise Resolver404({
                    # this is a bit convoluted, but it makes the PatternStub work with Django 1.x and 2.x
                    'tried': [[ PatternStub(match.url_name, msg, PatternStub(match.url_name, msg, None)) ]],
                    'path': path,
                })
        raise Resolver404({'path': path})
502464
private boolean matchesPath(String routePath, String pathToMatch) {
        routePath = PathKit.VAR_REGEXP_PATTERN.matcher(routePath).replaceAll(PathKit.VAR_REPLACE);
        return pathToMatch.matches("(?i)" + routePath);
    }
254609
function parent(object, path) {
        return path.length == 1 ? object : get(object, baseSlice(path, 0, -1));
      }