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

Function flattenFactory

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

Source from the content-addressed store, hash-verified

3457 )
3458 }
3459 function flattenFactory(s, o, i) {
3460 var a = makeSequence(s)
3461 return (
3462 (a.__iterateUncached = function (a, u) {
3463 var _ = 0,
3464 w = !1
3465 function flatDeep(s, x) {
3466 var C = this
3467 s.__iterate(function (s, u) {
3468 return (
3469 (!o || x < o) && isIterable(s)
3470 ? flatDeep(s, x + 1)
3471 : !1 === a(s, i ? u : _++, C) && (w = !0),
3472 !w
3473 )
3474 }, u)
3475 }
3476 return (flatDeep(s, 0), _)
3477 }),
3478 (a.__iteratorUncached = function (a, u) {
3479 var _ = s.__iterator(a, u),
3480 w = [],
3481 x = 0
3482 return new Iterator(function () {
3483 for (; _; ) {
3484 var s = _.next()
3485 if (!1 === s.done) {
3486 var C = s.value
3487 if ((a === V && (C = C[1]), (o && !(w.length < o)) || !isIterable(C)))
3488 return i ? s : iteratorValue(a, x++, C, s)
3489 ;(w.push(_), (_ = C.__iterator(a, u)))
3490 } else _ = w.pop()
3491 }
3492 return iteratorDone()
3493 })
3494 }),
3495 a
3496 )
3497 }
3498 function flatMapFactory(s, o, i) {
3499 var a = iterableClass(s)
3500 return s

Callers 1

Calls 7

makeSequenceFunction · 0.85
flatDeepFunction · 0.85
isIterableFunction · 0.85
iteratorValueFunction · 0.85
iteratorDoneFunction · 0.85
nextMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected