function getHandlerPart(routePart, parts, routeHandler, placeholders = []) {
  let part;

  do {
    part = parts.shift();
  } while (parts.length > 0 && part.length === 0);

  if (part === undefined) {
    routeHandler.handler = routePart.handler;
    if (routePart.placeholders !== null) {
      for (const i of Object.keys(routePart.placeholders)) {
        routeHandler.addArgument(routePart.placeholders[i], placeholders[i]);
      }
    }
    return routeHandler;
  }

  part = querystring.unescape(part);

  if (has(routePart.subparts, part)) {
    return getHandlerPart(
      routePart.subparts[part],
      parts,
      routeHandler,
      placeholders,
    );
  }

  if (routePart.subparts["*"]) {
    placeholders.push(part);
    return getHandlerPart(
      routePart.subparts["*"],
      parts,
      routeHandler,
      placeholders,
    );
  }

  return routeHandler;
}
Populate the routeHandler argument with parametric values, if any

@param {RoutePart} routePart - tree leaf to scan
@param {Array<string>} parts
@param {RouteHandler} routeHandler - registered function handler
@param {Array<string>} placeholders - sorted array to populate the list of parametric values
@returns {RouteHandler} registered function handler