function normalizeRoutePath(path) {
  let normalized = path;
  while (normalized.endsWith("/") || normalized.endsWith("*")) {
    normalized = normalized.slice(0, -1);
  }
  while (normalized.startsWith("/")) {
    normalized = normalized.slice(1);
  }
  if (!normalized) {
    return "/";
  }
  return `/${normalized}`;
}

export { normalizeRoutePath };
//# sourceMappingURL=normalizeRoutePath.esm.js.map
