MCPcopy Index your code
hub / github.com/BrainJS/brain.js / afterTransform

Function afterTransform

browser.js:24720–24743  ·  view source on GitHub ↗
(er, data)

Source from the content-addressed store, hash-verified

24718util.inherits(Transform, Duplex);
24719
24720function afterTransform(er, data) {
24721 var ts = this._transformState;
24722 ts.transforming = false;
24723
24724 var cb = ts.writecb;
24725
24726 if (!cb) {
24727 return this.emit('error', new Error('write callback called multiple times'));
24728 }
24729
24730 ts.writechunk = null;
24731 ts.writecb = null;
24732
24733 if (data != null) // single equals check for both `null` and `undefined`
24734 this.push(data);
24735
24736 cb(er);
24737
24738 var rs = this._readableState;
24739 rs.reading = false;
24740 if (rs.needReadable || rs.length < rs.highWaterMark) {
24741 this._read(rs.highWaterMark);
24742 }
24743}
24744
24745function Transform(options) {
24746 if (!(this instanceof Transform)) return new Transform(options);

Callers

nothing calls this directly

Calls 1

cbFunction · 0.85

Tested by

no test coverage detected