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

Function finishMaybe

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

Source from the content-addressed store, hash-verified

6427 })
6428 }
6429 function finishMaybe(s, o) {
6430 var i = needFinish(o)
6431 if (
6432 i &&
6433 ((function prefinish(s, o) {
6434 o.prefinished ||
6435 o.finalCalled ||
6436 ('function' != typeof s._final || o.destroyed
6437 ? ((o.prefinished = !0), s.emit('prefinish'))
6438 : (o.pendingcb++, (o.finalCalled = !0), u.nextTick(callFinal, s, o)))
6439 })(s, o),
6440 0 === o.pendingcb && ((o.finished = !0), s.emit('finish'), o.autoDestroy))
6441 ) {
6442 var a = s._readableState
6443 ;(!a || (a.autoDestroy && a.endEmitted)) && s.destroy()
6444 }
6445 return i
6446 }
6447 ;(i(56698)(Writable, w),
6448 (WritableState.prototype.getBuffer = function getBuffer() {
6449 for (var s = this.bufferedRequest, o = []; s; ) (o.push(s), (s = s.next))

Callers 4

WritableStateFunction · 0.85
afterWriteFunction · 0.85
callFinalFunction · 0.85

Calls 2

needFinishFunction · 0.85
destroyMethod · 0.45

Tested by

no test coverage detected