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

Function mergeData

static/vuejs/vue.esm.js:970–985  ·  view source on GitHub ↗

* Helper that recursively merges two data objects together.

(to, from)

Source from the content-addressed store, hash-verified

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

Callers 1

vue.esm.jsFile · 0.70

Calls 3

hasOwnFunction · 0.70
setFunction · 0.70
isPlainObjectFunction · 0.70

Tested by

no test coverage detected