bloodymary/app/bootstrapModules.js

13 lines
280 B
JavaScript
Raw Normal View History

2020-05-17 12:54:11 +00:00
"use strict";
let hasInit = false;
exports.init = function (bootstrapModules) {
if (hasInit) {
throw new Error(`bootstrapModules has already init`);
}
for (const mod of Object.keys(bootstrapModules)) {
exports[mod] = bootstrapModules[mod];
}
hasInit = true;
};