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

Function WritableState

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

Source from the content-addressed store, hash-verified

6275 ce = L.errorOrDestroy
6276 function nop() {}
6277 function WritableState(s, o, _) {
6278 ;((a = a || i(25382)),
6279 (s = s || {}),
6280 'boolean' != typeof _ && (_ = o instanceof a),
6281 (this.objectMode = !!s.objectMode),
6282 _ && (this.objectMode = this.objectMode || !!s.writableObjectMode),
6283 (this.highWaterMark = B(this, s, 'writableHighWaterMark', _)),
6284 (this.finalCalled = !1),
6285 (this.needDrain = !1),
6286 (this.ending = !1),
6287 (this.ended = !1),
6288 (this.finished = !1),
6289 (this.destroyed = !1))
6290 var w = !1 === s.decodeStrings
6291 ;((this.decodeStrings = !w),
6292 (this.defaultEncoding = s.defaultEncoding || 'utf8'),
6293 (this.length = 0),
6294 (this.writing = !1),
6295 (this.corked = 0),
6296 (this.sync = !0),
6297 (this.bufferProcessing = !1),
6298 (this.onwrite = function (s) {
6299 !(function onwrite(s, o) {
6300 var i = s._writableState,
6301 a = i.sync,
6302 _ = i.writecb
6303 if ('function' != typeof _) throw new z()
6304 if (
6305 ((function onwriteStateUpdate(s) {
6306 ;((s.writing = !1),
6307 (s.writecb = null),
6308 (s.length -= s.writelen),
6309 (s.writelen = 0))
6310 })(i),
6311 o)
6312 )
6313 !(function onwriteError(s, o, i, a, _) {
6314 ;(--o.pendingcb,
6315 i
6316 ? (u.nextTick(_, a),
6317 u.nextTick(finishMaybe, s, o),
6318 (s._writableState.errorEmitted = !0),
6319 ce(s, a))
6320 : (_(a),
6321 (s._writableState.errorEmitted = !0),
6322 ce(s, a),
6323 finishMaybe(s, o)))
6324 })(s, i, a, o, _)
6325 else {
6326 var w = needFinish(i) || s.destroyed
6327 ;(w ||
6328 i.corked ||
6329 i.bufferProcessing ||
6330 !i.bufferedRequest ||
6331 clearBuffer(s, i),
6332 a ? u.nextTick(afterWrite, s, i, w, _) : afterWrite(s, i, w, _))
6333 }
6334 })(o, s)

Callers

nothing calls this directly

Calls 8

finishMaybeFunction · 0.85
needFinishFunction · 0.85
clearBufferFunction · 0.85
afterWriteFunction · 0.85
iFunction · 0.70
BFunction · 0.70
_Function · 0.70
ceFunction · 0.50

Tested by

no test coverage detected