MCPcopy
hub / github.com/GrapesJS/grapesjs / __remove

Function __remove

packages/core/src/abstract/Module.ts:277–287  ·  view source on GitHub ↗
(model: any, opts: any = {})

Source from the content-addressed store, hash-verified

275 }
276
277 __remove(model: any, opts: any = {}) {
278 const { em } = this;
279 //@ts-ignore
280 const md = isString(model) ? this.get(model) : model;
281 const rm = () => {
282 md && this.all.remove(md, opts);
283 return md;
284 };
285 !opts.silent && em?.trigger(this.events.removeBefore, md, rm, opts);
286 return !opts.abort && rm();
287 }
288
289 __catchAllEvent(event: any, model: any, coll: any, opts?: any) {
290 const { em, events } = this;

Callers

nothing calls this directly

Calls 4

rmFunction · 0.85
isStringFunction · 0.50
getMethod · 0.45
triggerMethod · 0.45

Tested by

no test coverage detected