summer-glove
Version:
[](https://www.npmjs.com/package/summer-glove) ## Fit like a glove 🧤 Summer-glove is a route manager, providing a quick and easy way to configure an express application. Summer-glo
19 lines (18 loc) • 1.02 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const SwaggerInformationCore_1 = __importDefault(require("../core/SwaggerInformationCore"));
const ExpressInformationCore_1 = __importDefault(require("../core/ExpressInformationCore"));
function initCore(constructorName) {
const swaggerInformation = SwaggerInformationCore_1.default.getInstance().getObjectConfig().mappedApi[constructorName];
const expressInformation = ExpressInformationCore_1.default.getInstance().getObjectConfig().mappedApi[constructorName];
if (!expressInformation) {
ExpressInformationCore_1.default.getInstance().getObjectConfig().mappedApi[constructorName] = {};
}
if (!swaggerInformation) {
SwaggerInformationCore_1.default.getInstance().getObjectConfig().mappedApi[constructorName] = {};
}
}
exports.default = initCore;