MCPcopy Create free account
hub / github.com/dataease/SQLBot / legacy_copy

Function legacy_copy

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

Source from the content-addressed store, hash-verified

40366 var i
40367 return !(null === (i = Ol(s, o)) || void 0 === i ? void 0 : i.writable)
40368 }
40369 function legacy_copy(s, o) {
40370 if ('object' === (void 0 === s ? 'undefined' : _type_of(s)) && null !== s) {
40371 var i
40372 if (kl(s)) i = []
40373 else if ('[object Date]' === to_string(s)) i = new Date(s.getTime ? s.getTime() : s)
40374 else if (
40375 (function (s) {
40376 return '[object RegExp]' === to_string(s)
40377 })(s)
40378 )
40379 i = new RegExp(s)
40380 else if (
40381 (function (s) {
40382 return '[object Error]' === to_string(s)
40383 })(s)
40384 )
40385 i = { message: s.message }
40386 else if (
40387 (function (s) {
40388 return '[object Boolean]' === to_string(s)
40389 })(s) ||
40390 (function (s) {
40391 return '[object Number]' === to_string(s)
40392 })(s) ||
40393 (function (s) {
40394 return '[object String]' === to_string(s)
40395 })(s)
40396 )
40397 i = Object(s)
40398 else {
40399 if (is_typed_array(s)) return s.slice()
40400 i = Object.create(Object.getPrototypeOf(s))
40401 }
40402 var a = o.includeSymbols ? own_enumerable_keys : Object.keys,
40403 u = !0,
40404 _ = !1,
40405 w = void 0
40406 try {
40407 for (var x, C = a(s)[Symbol.iterator](); !(u = (x = C.next()).done); u = !0) {
40408 var j = x.value
40409 i[j] = s[j]
40410 }
40411 } catch (s) {
40412 ;((_ = !0), (w = s))
40413 } finally {
40414 try {
40415 u || null == C.return || C.return()
40416 } finally {
40417 if (_) throw w
40418 }
40419 }
40420 return i
40421 }
40422 return s
40423 }
40424 var Il,
40425 Tl,

Callers 2

walkFunction · 0.85

Calls 7

_type_ofFunction · 0.85
klFunction · 0.85
to_stringFunction · 0.85
is_typed_arrayFunction · 0.85
nextMethod · 0.80
aFunction · 0.70
createMethod · 0.65

Tested by

no test coverage detected