@aikidosec/firewall
Version:
Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks
14 lines (13 loc) • 371 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.envToBool = envToBool;
const trueValues = ["true", "1", "yes", "y", "on"];
/**
* Parses the string value of an environment variable to a boolean.
*/
function envToBool(envName) {
if (!envName) {
return false;
}
return trueValues.includes(envName.toLowerCase());
}