MCPcopy
hub / github.com/tinymce/tinymce / extend

Function extend

modules/tinymce/src/core/main/ts/api/util/Tools.ts:111–124  ·  view source on GitHub ↗
(obj: any, ...exts: any[])

Source from the content-addressed store, hash-verified

109const hasOwnProperty = Obj.has;
110
111const extend = (obj: any, ...exts: any[]): any => {
112 for (let i = 0; i < exts.length; i++) {
113 const ext = exts[i];
114 for (const name in ext) {
115 if (Obj.has(ext, name)) {
116 const value = ext[name];
117 if (value !== undefined) {
118 obj[name] = value;
119 }
120 }
121 }
122 }
123 return obj;
124};
125
126/**
127 * Executed the specified function for each item in a object tree.

Callers 6

constructorMethod · 0.85
insertContentMethod · 0.85
createMapFunction · 0.85
addCustomElementFunction · 0.85
whitespaceCleanerFunction · 0.85
addRootBlocksFunction · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…