@copado/copado-cli
Version:
Copado Developer CLI
24 lines • 829 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AntPathMatcher = void 0;
const ant_path_matcher_1 = __importDefault(require("ant-path-matcher"));
/**
* This class checks if paths belong to a patter in order to exlude the path for being sent
* @export
* @class AntPathMatcher
*/
class AntPathMatcher {
static async excludePath(path, patternList) {
const matcher = new ant_path_matcher_1.default();
for (const pattern of patternList) {
if (matcher.match(pattern, path))
return true;
}
return false;
}
}
exports.AntPathMatcher = AntPathMatcher;
//# sourceMappingURL=pathmatcher.js.map