Initial commit - Event Planner application

This commit is contained in:
mberlin
2026-03-18 14:55:56 -03:00
commit 86d779eb4d
7548 changed files with 1006324 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isRouteExcluded = void 0;
const path_to_regexp_1 = require("path-to-regexp");
const isRouteExcluded = (req, paths = []) => {
return paths.some((path) => {
const { regexp } = (0, path_to_regexp_1.pathToRegexp)(path);
const queryParamsIndex = req.originalUrl.indexOf('?');
const pathname = queryParamsIndex >= 0
? req.originalUrl.slice(0, queryParamsIndex)
: req.originalUrl;
if (!regexp.exec(pathname + '/')) {
return false;
}
return true;
});
};
exports.isRouteExcluded = isRouteExcluded;