MCPcopy Create free account
hub / github.com/TruthHun/BookStack / endReadable

Function endReadable

static/word2md/mammoth.browser.js:25060–25071  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

25058}
25059
25060function endReadable(stream) {
25061 var state = stream._readableState;
25062
25063 // If we get here before consuming all the bytes, then that is a
25064 // bug in node. Should never happen.
25065 if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
25066
25067 if (!state.endEmitted) {
25068 state.ended = true;
25069 processNextTick(endReadableNT, state, stream);
25070 }
25071}
25072
25073function endReadableNT(state, stream) {
25074 // Check that we didn't get one last unshift.

Callers 1

mammoth.browser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected