MCPcopy
hub / github.com/fanmingming/live / mergeAssets

Function mergeAssets

m3u8/vue.js:1315–1328  ·  view source on GitHub ↗

* Assets * * When a vm is present (instance creation), we need to do * a three-way merge between constructor options, instance * options and parent options.

(
    parentVal,
    childVal,
    vm,
    key
  )

Source from the content-addressed store, hash-verified

1313 * options and parent options.
1314 */
1315 function mergeAssets (
1316 parentVal,
1317 childVal,
1318 vm,
1319 key
1320 ) {
1321 var res = Object.create(parentVal || null);
1322 if (childVal) {
1323 assertObjectType(key, childVal, vm);
1324 return extend(res, childVal)
1325 } else {
1326 return res
1327 }
1328 }
1329
1330 ASSET_TYPES.forEach(function (type) {
1331 strats[type + 's'] = mergeAssets;

Callers

nothing calls this directly

Calls 2

assertObjectTypeFunction · 0.85
extendFunction · 0.85

Tested by

no test coverage detected