UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks

13 lines (12 loc) 327 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.safeCreateRegExp = safeCreateRegExp; function safeCreateRegExp(pattern, flags) { try { return new RegExp(pattern, flags); } catch { // Don't throw errors when the regex is invalid return undefined; } }