@aikidosec/firewall
Version:
Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.
12 lines (11 loc) • 500 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isLibBundled = isLibBundled;
// Detect at runtime if the library is bundled inside an application
function isLibBundled() {
// Replace Windows backslashes with forward slashes
const normalizedDirName = __dirname.replace(/\\/g, "/");
return (!normalizedDirName.includes("node_modules/@aikidosec/firewall/helpers") &&
!normalizedDirName.includes("/build/helpers") // In case of e2e tests
);
}