bloodymary/app/bootstrapModules.js

13 lines
280 B
JavaScript
Raw Normal View History

2020-08-07 18:43:05 +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;
};