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

Function _clone

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

Source from the content-addressed store, hash-verified

54419 }
54420 resolveOpenAPI31Strategy.cache = new WeakMap()
54421 const kx = resolveOpenAPI31Strategy
54422 function _clone(s, o, i) {
54423 if (
54424 (i || (i = new Ox()),
54425 (function _isPrimitive(s) {
54426 var o = typeof s
54427 return null == s || ('object' != o && 'function' != o)
54428 })(s))
54429 )
54430 return s
54431 var a = function copy(a) {
54432 var u = i.get(s)
54433 if (u) return u
54434 for (var _ in (i.set(s, a), s))
54435 Object.prototype.hasOwnProperty.call(s, _) && (a[_] = o ? _clone(s[_], !0, i) : s[_])
54436 return a
54437 }
54438 switch (ra(s)) {
54439 case 'Object':
54440 return a(Object.create(Object.getPrototypeOf(s)))
54441 case 'Array':
54442 return a(Array(s.length))
54443 case 'Date':
54444 return new Date(s.valueOf())
54445 case 'RegExp':
54446 return _cloneRegExp(s)
54447 case 'Int8Array':
54448 case 'Uint8Array':
54449 case 'Uint8ClampedArray':
54450 case 'Int16Array':
54451 case 'Uint16Array':
54452 case 'Int32Array':
54453 case 'Uint32Array':
54454 case 'Float32Array':
54455 case 'Float64Array':
54456 case 'BigInt64Array':
54457 case 'BigUint64Array':
54458 return s.slice()
54459 default:
54460 return s
54461 }
54462 }
54463 var Ox = (function () {
54464 function _ObjectMap() {

Callers 2

aFunction · 0.85

Calls 5

_cloneRegExpFunction · 0.85
valueOfMethod · 0.80
aFunction · 0.70
createMethod · 0.65
raFunction · 0.50

Tested by

no test coverage detected