MCPcopy Create free account
hub / github.com/TruthHun/BookStack / mergeData

Function mergeData

static/vuejs/vue.runtime.esm.js:966–981  ·  view source on GitHub ↗

* Helper that recursively merges two data objects together.

(to, from)

Source from the content-addressed store, hash-verified

964 * Helper that recursively merges two data objects together.
965 */
966function mergeData (to, from) {
967 if (!from) { return to }
968 var key, toVal, fromVal;
969 var keys = Object.keys(from);
970 for (var i = 0; i < keys.length; i++) {
971 key = keys[i];
972 toVal = to[key];
973 fromVal = from[key];
974 if (!hasOwn(to, key)) {
975 set(to, key, fromVal);
976 } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
977 mergeData(toVal, fromVal);
978 }
979 }
980 return to
981}
982
983/**
984 * Data

Callers 1

vue.runtime.esm.jsFile · 0.70

Calls 3

hasOwnFunction · 0.70
setFunction · 0.70
isPlainObjectFunction · 0.70

Tested by

no test coverage detected