bloodymary/app/bootstrapModules.js

15 lines
282 B
JavaScript
Raw Normal View History

2020-12-03 21:58:13 +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;
};