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

Method write

tools/license2rtf.mjs:16–23  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

14 }
15
16 write(data) {
17 const lines = (this.buffer + data).split(/\r\n|\n\r|\n|\r/);
18 for (let i = 0; i < lines.length - 1; i++) {
19 this.emit('data', lines[i]);
20 }
21 this.buffer = lines[lines.length - 1];
22 return true;
23 }
24
25 end(data) {
26 this.write(data || '');

Callers 1

endMethod · 0.95

Calls 2

splitMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected