MCPcopy
hub / github.com/codex-team/editor.js / constructModules

Method constructModules

src/components/core.ts:290–301  ·  view source on GitHub ↗

* Make modules instances and save it to the @property this.moduleInstances

()

Source from the content-addressed store, hash-verified

288 * Make modules instances and save it to the @property this.moduleInstances
289 */
290 private constructModules(): void {
291 Object.entries(Modules).forEach(([key, module]) => {
292 try {
293 this.moduleInstances[key] = new module({
294 config: this.configuration,
295 eventsDispatcher: this.eventsDispatcher,
296 });
297 } catch (e) {
298 _.log('[constructModules]', `Module ${key} skipped because`, 'error', e);
299 }
300 });
301 }
302
303 /**
304 * Modules instances configuration:

Callers 1

initMethod · 0.95

Calls 2

forEachMethod · 0.80
entriesMethod · 0.80

Tested by

no test coverage detected