MCPcopy
hub / github.com/nhn/tui.chart / merge

Function merge

apps/chart/src/helpers/utils.ts:183–201  ·  view source on GitHub ↗
(target: Record<string, any>, ...args: Record<string, any>[])

Source from the content-addressed store, hash-verified

181}
182
183export function merge(target: Record<string, any>, ...args: Record<string, any>[]) {
184 target = target || {};
185
186 args.forEach((obj) => {
187 if (!obj) {
188 return;
189 }
190
191 forEach(obj, (item, key) => {
192 if (Object.prototype.toString.call(item) === '[object Object]') {
193 target[key] = merge(target[key], item);
194 } else {
195 target[key] = item;
196 }
197 });
198 });
199
200 return target;
201}
202
203export function throttle(fn: Function, interval = 0) {
204 let base: number | null = null;

Callers 2

webpack.config.jsFile · 0.85
webpack.config.jsFile · 0.85

Calls 2

forEachFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected