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

Function afterTransform

static/word2md/mammoth.browser.js:25163–25183  ·  view source on GitHub ↗
(stream, er, data)

Source from the content-addressed store, hash-verified

25161}
25162
25163function afterTransform(stream, er, data) {
25164 var ts = stream._transformState;
25165 ts.transforming = false;
25166
25167 var cb = ts.writecb;
25168
25169 if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
25170
25171 ts.writechunk = null;
25172 ts.writecb = null;
25173
25174 if (data !== null && data !== undefined) stream.push(data);
25175
25176 cb(er);
25177
25178 var rs = stream._readableState;
25179 rs.reading = false;
25180 if (rs.needReadable || rs.length < rs.highWaterMark) {
25181 stream._read(rs.highWaterMark);
25182 }
25183}
25184
25185function Transform(options) {
25186 if (!(this instanceof Transform)) return new Transform(options);

Callers 1

TransformStateFunction · 0.70

Calls 1

cbFunction · 0.70

Tested by

no test coverage detected