@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.
14 lines (13 loc) • 441 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isOptionsObject = isOptionsObject;
/**
* Check if the argument is treated as an options object by Node.js.
* For checking if the argument can be used as options for a outgoing HTTP request.
*/
function isOptionsObject(arg) {
return (typeof arg === "object" &&
!Array.isArray(arg) &&
arg !== null &&
!(arg instanceof URL));
}