UNPKG

@aikidosec/firewall

Version:

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

15 lines (14 loc) 541 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapDefaultOrNamed = wrapDefaultOrNamed; const wrap_1 = require("../../helpers/wrap"); /** * This function allows to wrap a default export or a named export. * If the name is undefined, it will wrap the default export of a module. */ function wrapDefaultOrNamed(module, name, wrapper) { if (typeof name === "undefined") { return (0, wrap_1.createWrappedFunction)(module, wrapper); } return (0, wrap_1.wrap)(module, name, wrapper); }