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

Function readableAddChunk

frontend/public/swagger-ui-bundle.js:19632–19688  ·  view source on GitHub ↗
(s, o, i, a, u)

Source from the content-addressed store, hash-verified

19630 w.call(this))
19631 }
19632 function readableAddChunk(s, o, i, a, u) {
19633 j('readableAddChunk', o)
19634 var _,
19635 w = s._readableState
19636 if (null === o)
19637 ((w.reading = !1),
19638 (function onEofChunk(s, o) {
19639 if ((j('onEofChunk'), o.ended)) return
19640 if (o.decoder) {
19641 var i = o.decoder.end()
19642 i && i.length && (o.buffer.push(i), (o.length += o.objectMode ? 1 : i.length))
19643 }
19644 ;((o.ended = !0),
19645 o.sync
19646 ? emitReadable(s)
19647 : ((o.needReadable = !1),
19648 o.emittedReadable || ((o.emittedReadable = !0), emitReadable_(s))))
19649 })(s, w))
19650 else if (
19651 (u ||
19652 (_ = (function chunkInvalid(s, o) {
19653 var i
19654 ;(function _isUint8Array(s) {
19655 return x.isBuffer(s) || s instanceof C
19656 })(o) ||
19657 'string' == typeof o ||
19658 void 0 === o ||
19659 s.objectMode ||
19660 (i = new ee('chunk', ['string', 'Buffer', 'Uint8Array'], o))
19661 return i
19662 })(w, o)),
19663 _)
19664 )
19665 le(s, _)
19666 else if (w.objectMode || (o && o.length > 0))
19667 if (
19668 ('string' == typeof o ||
19669 w.objectMode ||
19670 Object.getPrototypeOf(o) === x.prototype ||
19671 (o = (function _uint8ArrayToBuffer(s) {
19672 return x.from(s)
19673 })(o)),
19674 a)
19675 )
19676 w.endEmitted ? le(s, new ce()) : addChunk(s, w, o, !0)
19677 else if (w.ended) le(s, new ie())
19678 else {
19679 if (w.destroyed) return !1
19680 ;((w.reading = !1),
19681 w.decoder && !i
19682 ? ((o = w.decoder.write(o)),
19683 w.objectMode || 0 !== o.length ? addChunk(s, w, o, !1) : maybeReadMore(s, w))
19684 : addChunk(s, w, o, !1))
19685 }
19686 else a || ((w.reading = !1), maybeReadMore(s, w))
19687 return !w.ended && (w.length < w.highWaterMark || 0 === w.length)
19688 }
19689 function addChunk(s, o, i, a) {

Callers 1

Calls 8

emitReadableFunction · 0.85
emitReadable_Function · 0.85
addChunkFunction · 0.85
maybeReadMoreFunction · 0.85
jFunction · 0.50
leFunction · 0.50
pushMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected