MCPcopy
hub / github.com/vuejs/core / deepMergeData

Function deepMergeData

packages/runtime-core/src/compat/data.ts:4–16  ·  view source on GitHub ↗
(to: any, from: any)

Source from the content-addressed store, hash-verified

2import { DeprecationTypes, warnDeprecation } from './compatConfig'
3
4export function deepMergeData(to: any, from: any): any {
5 for (const key in from) {
6 const toVal = to[key]
7 const fromVal = from[key]
8 if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)) {
9 __DEV__ && warnDeprecation(DeprecationTypes.OPTIONS_DATA_MERGE, null, key)
10 deepMergeData(toVal, fromVal)
11 } else {
12 to[key] = fromVal
13 }
14 }
15 return to
16}

Callers

nothing calls this directly

Calls 2

isPlainObjectFunction · 0.90
warnDeprecationFunction · 0.90

Tested by

no test coverage detected