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

Function mergeData

static/vuejs/vue.runtime.js:972–987  ·  view source on GitHub ↗

* Helper that recursively merges two data objects together.

(to, from)

Source from the content-addressed store, hash-verified

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

Callers 1

vue.runtime.jsFile · 0.70

Calls 3

hasOwnFunction · 0.70
setFunction · 0.70
isPlainObjectFunction · 0.70

Tested by

no test coverage detected