MCPcopy
hub / github.com/BrainJS/brain.js / done

Function done

browser.js:24844–24857  ·  view source on GitHub ↗
(stream, er, data)

Source from the content-addressed store, hash-verified

24842};
24843
24844function done(stream, er, data) {
24845 if (er) return stream.emit('error', er);
24846
24847 if (data != null) // single equals check for both `null` and `undefined`
24848 stream.push(data);
24849
24850 // if there's nothing in the write buffer, then that means
24851 // that nothing more will ever be provided
24852 if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
24853
24854 if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
24855
24856 return stream.push(null);
24857}
24858},{"./_stream_duplex":94,"core-util-is":51,"inherits":88}],98:[function(require,module,exports){
24859(function (process,global,setImmediate){
24860// Copyright Joyent, Inc. and other Node contributors.

Callers 8

prefinishFunction · 0.70
ThawFunction · 0.70
lstm.jsFile · 0.50
gru.jsFile · 0.50
rnn-time-step.jsFile · 0.50
trainWithLogAsyncFunction · 0.50
testBitwiseAsyncFunction · 0.50
trainopts.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected