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

Function finishMaybe

static/word2md/mammoth.browser.js:25784–25796  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

25782}
25783
25784function finishMaybe(stream, state) {
25785 var need = needFinish(state);
25786 if (need) {
25787 if (state.pendingcb === 0) {
25788 prefinish(stream, state);
25789 state.finished = true;
25790 stream.emit('finish');
25791 } else {
25792 prefinish(stream, state);
25793 }
25794 }
25795 return need;
25796}
25797
25798function endWritable(stream, state, cb) {
25799 state.ending = true;

Callers 2

afterWriteFunction · 0.70
endWritableFunction · 0.70

Calls 2

needFinishFunction · 0.70
prefinishFunction · 0.70

Tested by

no test coverage detected