MCPcopy Index your code
hub / github.com/nodejs/node / start

Method start

test/parallel/test-whatwg-transformstream.js:129–141  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

127 }
128
129 start(controller) {
130 this.stream = createReadStream(__filename);
131 this.stream.on('data', (chunk) => {
132 controller.enqueue(chunk.toString());
133 });
134 this.stream.once('end', () => {
135 if (!this.cancelCalled)
136 controller.close();
137 });
138 this.stream.once('error', (error) => {
139 controller.error(error);
140 });
141 }
142
143 cancel() {
144 this.cancelCalled = true;

Callers

nothing calls this directly

Calls 7

closeMethod · 0.65
createReadStreamFunction · 0.50
onMethod · 0.45
enqueueMethod · 0.45
toStringMethod · 0.45
onceMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected