MCPcopy Index your code
hub / github.com/codex-team/editor.js / prepareConfig

Method prepareConfig

src/components/modules/tools.ts:403–422  ·  view source on GitHub ↗

* Unify tools config

()

Source from the content-addressed store, hash-verified

401 * Unify tools config
402 */
403 private prepareConfig(): {[name: string]: ToolSettings} {
404 const config: {[name: string]: ToolSettings} = {};
405
406 /**
407 * Save Tools settings to a map
408 */
409 for (const toolName in this.config.tools) {
410 /**
411 * If Tool is an object not a Tool's class then
412 * save class and settings separately
413 */
414 if (_.isObject(this.config.tools[toolName])) {
415 config[toolName] = this.config.tools[toolName] as ToolSettings;
416 } else {
417 config[toolName] = { class: this.config.tools[toolName] as ToolConstructable };
418 }
419 }
420
421 return config;
422 }
423}

Callers 1

prepareMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected