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

Method destroy

src/components/modules/tools.ts:166–172  ·  view source on GitHub ↗

* Calls each Tool reset method to clean up anything set by Tool

()

Source from the content-addressed store, hash-verified

164 * Calls each Tool reset method to clean up anything set by Tool
165 */
166 public destroy(): void {
167 Object.values(this.available).forEach(async tool => {
168 if (_.isFunction(tool.reset)) {
169 await tool.reset();
170 }
171 });
172 }
173
174 /**
175 * Returns internal tools

Callers

nothing calls this directly

Calls 3

forEachMethod · 0.80
valuesMethod · 0.80
resetMethod · 0.65

Tested by

no test coverage detected