MCPcopy Index your code
hub / github.com/dataease/SQLBot / mergeObject

Function mergeObject

frontend/public/swagger-ui-bundle.js:5660–5684  ·  view source on GitHub ↗
(s, o, i)

Source from the content-addressed store, hash-verified

5658 }
5659 }
5660 function mergeObject(s, o, i) {
5661 var a = {}
5662 return (
5663 i.isMergeableObject(s) &&
5664 getKeys(s).forEach(function (o) {
5665 a[o] = cloneUnlessOtherwiseSpecified(s[o], i)
5666 }),
5667 getKeys(o).forEach(function (u) {
5668 ;(function propertyIsUnsafe(s, o) {
5669 return (
5670 propertyIsOnObject(s, o) &&
5671 !(Object.hasOwnProperty.call(s, o) && Object.propertyIsEnumerable.call(s, o))
5672 )
5673 })(s, u) ||
5674 (propertyIsOnObject(s, u) && i.isMergeableObject(o[u])
5675 ? (a[u] = (function getMergeFunction(s, o) {
5676 if (!o.customMerge) return deepmerge
5677 var i = o.customMerge(s)
5678 return 'function' == typeof i ? i : deepmerge
5679 })(u, i)(s[u], o[u], i))
5680 : (a[u] = cloneUnlessOtherwiseSpecified(o[u], i)))
5681 }),
5682 a
5683 )
5684 }
5685 function deepmerge(s, i, a) {
5686 ;(((a = a || {}).arrayMerge = a.arrayMerge || defaultArrayMerge),
5687 (a.isMergeableObject = a.isMergeableObject || o),

Callers 1

deepmergeFunction · 0.85

Calls 4

getKeysFunction · 0.85
propertyIsOnObjectFunction · 0.85
forEachMethod · 0.45

Tested by

no test coverage detected