MCPcopy
hub / github.com/amark/gun / afterTransform

Function afterTransform

test/mocha.js:9699–9722  ·  view source on GitHub ↗
(stream, er, data)

Source from the content-addressed store, hash-verified

9697}
9698
9699function afterTransform(stream, er, data) {
9700 var ts = stream._transformState;
9701 ts.transforming = false;
9702
9703 var cb = ts.writecb;
9704
9705 if (!cb)
9706 return stream.emit('error', new Error('no writecb in Transform class'));
9707
9708 ts.writechunk = null;
9709 ts.writecb = null;
9710
9711 if (!util.isNullOrUndefined(data))
9712 stream.push(data);
9713
9714 if (cb)
9715 cb(er);
9716
9717 var rs = stream._readableState;
9718 rs.reading = false;
9719 if (rs.needReadable || rs.length < rs.highWaterMark) {
9720 stream._read(rs.highWaterMark);
9721 }
9722}
9723
9724
9725function Transform(options) {

Callers 1

TransformStateFunction · 0.85

Calls 2

_readMethod · 0.80
cbFunction · 0.70

Tested by

no test coverage detected