@@ -77,7 +77,7 @@ queue until it is consumed.
7777Once the total size of the internal read buffer reaches the threshold specified
7878by ` highWaterMark ` , the stream will temporarily stop reading data from the
7979underlying resource until the data currently buffered can be consumed (that is,
80- the stream will stop calling the internal ` readable.\ _read() ` method that is
80+ the stream will stop calling the internal ` readable._read() ` method that is
8181used to fill the read buffer).
8282
8383Data is buffered in Writable streams when the
@@ -321,7 +321,7 @@ The buffered data will be flushed when either the [`stream.uncork()`][] or
321321The primary intent of ` writable.cork() ` is to avoid a situation where writing
322322many small chunks of data to a stream do not cause an backup in the internal
323323buffer that would have an adverse impact on performance. In such situations,
324- implementations that implement the ` writable.\ _writev() ` method can perform
324+ implementations that implement the ` writable._writev() ` method can perform
325325buffered writes in a more optimized manner.
326326
327327##### writable.end([ chunk] [ , encoding ] [ , callback] )
@@ -1083,8 +1083,8 @@ const myWritable = new Writable({
10831083The ` stream.Writable ` class is extended to implement a [ Writable] [ ] stream.
10841084
10851085Custom Writable streams * must* call the ` new stream.Writable([options]) `
1086- constructor and implement the ` writable.\ _write() ` method. The
1087- ` writable.\ _writev() ` method * may* also be implemented.
1086+ constructor and implement the ` writable._write() ` method. The
1087+ ` writable._writev() ` method * may* also be implemented.
10881088
10891089#### Constructor: new stream.Writable([ options] )
10901090
@@ -1146,7 +1146,7 @@ const myWritable = new Writable({
11461146});
11471147```
11481148
1149- #### writable.\ _ write(chunk, encoding, callback)
1149+ #### writable._ write(chunk, encoding, callback)
11501150
11511151* ` chunk ` {Buffer|String} The chunk to be written. Will ** always**
11521152 be a buffer unless the ` decodeStrings ` option was set to ` false ` .
@@ -1173,10 +1173,10 @@ successfully or failed with an error. The first argument passed to the
11731173write succeeded.
11741174
11751175It is important to note that all calls to ` writable.write() ` that occur between
1176- the time ` writable.\ _write() ` is called and the ` callback ` is called will cause
1176+ the time ` writable._write() ` is called and the ` callback ` is called will cause
11771177the written data to be buffered. Once the ` callback ` is invoked, the stream will
11781178emit a ` 'drain' ` event. If a stream implementation is capable of processing
1179- multiple chunks of data at once, the ` writable.\ _writev() ` method should be
1179+ multiple chunks of data at once, the ` writable._writev() ` method should be
11801180implemented.
11811181
11821182If the ` decodeStrings ` property is set in the constructor options, then
@@ -1187,11 +1187,11 @@ data encodings. If the `decodeStrings` property is explicitly set to `false`,
11871187the ` encoding ` argument can be safely ignored, and ` chunk ` will always be a
11881188` Buffer ` .
11891189
1190- The ` writable.\ _write() ` method is prefixed with an underscore because it is
1190+ The ` writable._write() ` method is prefixed with an underscore because it is
11911191internal to the class that defines it, and should never be called directly by
11921192user programs.
11931193
1194- #### writable.\ _ writev(chunks, callback)
1194+ #### writable._ writev(chunks, callback)
11951195
11961196* ` chunks ` {Array} The chunks to be written. Each chunk has following
11971197 format: ` { chunk: ..., encoding: ... } ` .
@@ -1202,22 +1202,22 @@ user programs.
12021202should be implemented by child classes, and called only by the internal Writable
12031203class methods only.
12041204
1205- The ` writable.\ _writev() ` method may be implemented in addition to
1206- ` writable.\ _write() ` in stream implementations that are capable of processing
1205+ The ` writable._writev() ` method may be implemented in addition to
1206+ ` writable._write() ` in stream implementations that are capable of processing
12071207multiple chunks of data at once. If implemented, the method will be called with
12081208all chunks of data currently buffered in the write queue.
12091209
1210- The ` writable.\ _writev() ` method is prefixed with an underscore because it is
1210+ The ` writable._writev() ` method is prefixed with an underscore because it is
12111211internal to the class that defines it, and should never be called directly by
12121212user programs.
12131213
12141214#### Errors While Writing
12151215
12161216It is recommended that errors occurring during the processing of the
1217- ` writable.\ _write() ` and ` writable.\ _writev() ` methods are reported by invoking
1217+ ` writable._write() ` and ` writable._writev() ` methods are reported by invoking
12181218the callback and passing the error as the first argument. This will cause an
12191219` 'error' ` event to be emitted by the Writable. Throwing an Error from within
1220- ` writable.\ _write() ` can result in expected and inconsistent behavior depending
1220+ ` writable._write() ` can result in expected and inconsistent behavior depending
12211221on how the stream is being used. Using the callback ensures consistent and
12221222predictable handling of errors.
12231223
@@ -1265,7 +1265,7 @@ class MyWritable extends Writable {
12651265The ` stream.Readable ` class is extended to implement a [ Readable] [ ] stream.
12661266
12671267Custom Readable streams * must* call the ` new stream.Readable([options]) `
1268- constructor and implement the ` readable.\ _read() ` method.
1268+ constructor and implement the ` readable._read() ` method.
12691269
12701270#### new stream.Readable([ options] )
12711271
@@ -1320,7 +1320,7 @@ const myReadable = new Readable({
13201320});
13211321```
13221322
1323- #### readable.\ _ read(size)
1323+ #### readable._ read(size)
13241324
13251325* ` size ` {Number} Number of bytes to read asynchronously
13261326
@@ -1329,7 +1329,7 @@ should be implemented by child classes, and called only by the internal Readable
13291329class methods only.
13301330
13311331All Readable stream implementations must provide an implementation of the
1332- ` readable.\ _read() ` method to fetch data from the underlying resource.
1332+ ` readable._read() ` method to fetch data from the underlying resource.
13331333
13341334When ` readable._read() ` is called, if data is available from the resource, the
13351335implementation should begin pushing that data into the read queue using the
@@ -1347,7 +1347,7 @@ much data to fetch. Other implementations may ignore this argument and simply
13471347provide data whenever it becomes available. There is no need to "wait" until
13481348` size ` bytes are available before calling [ ` stream.push(chunk) ` ] [ stream-push ] .
13491349
1350- The ` readable.\ _read() ` method is prefixed with an underscore because it is
1350+ The ` readable._read() ` method is prefixed with an underscore because it is
13511351internal to the class that defines it, and should never be called directly by
13521352user programs.
13531353
@@ -1407,13 +1407,13 @@ class SourceWrapper extends Readable {
14071407}
14081408```
14091409* Note* : The ` readable.push() ` method is intended be called only by Readable
1410- Implemeters, and only from within the ` readable.\ _read() ` method.
1410+ Implemeters, and only from within the ` readable._read() ` method.
14111411
14121412#### Errors While Reading
14131413
14141414It is recommended that errors occurring during the processing of the
1415- ` readable.\ _read() ` method are emitted using the ` 'error' ` event rather than
1416- being thrown. Throwing an Error from within ` readable.\ _read() ` can result in
1415+ ` readable._read() ` method are emitted using the ` 'error' ` event rather than
1416+ being thrown. Throwing an Error from within ` readable._read() ` can result in
14171417expected and inconsistent behavior depending on whether the stream is operating
14181418in flowing or paused mode. Using the ` 'error' ` event ensures consistent and
14191419predictable handling of errors.
@@ -1475,8 +1475,8 @@ to extending the `stream.Readable` *and* `stream.Writable` classes).
14751475and parasitically from ` stream.Writable ` .
14761476
14771477Custom Duplex streams * must* call the ` new stream.Duplex([options]) `
1478- constructor and implement * both* the ` readable.\ _read() ` and
1479- ` writable.\ _write() ` methods.
1478+ constructor and implement * both* the ` readable._read() ` and
1479+ ` writable._write() ` methods.
14801480
14811481#### new stream.Duplex(options)
14821482
@@ -1629,10 +1629,10 @@ that is either much smaller or much larger than its input.
16291629The ` stream.Transform ` class is extended to implement a [ Transform] [ ] stream.
16301630
16311631The ` stream.Transform ` class prototypically inherits from ` stream.Duplex ` and
1632- implements its own versions of the ` writable.\ _write() ` and ` readable.\ _read() `
1632+ implements its own versions of the ` writable._write() ` and ` readable._read() `
16331633methods. Custom Transform implementations * must* implement the
1634- [ ` transform.\ _transform() ` ] [ stream-_transform ] method and * may* also implement
1635- the [ ` transform.\ _flush() ` ] [ stream-_flush ] method.
1634+ [ ` transform._transform() ` ] [ stream-_transform ] method and * may* also implement
1635+ the [ ` transform._flush() ` ] [ stream-_flush ] method.
16361636
16371637* Note* : Care must be taken when using Transform streams in that data written
16381638to the stream can cause the Writable side of the stream to become paused if
@@ -1694,7 +1694,7 @@ by [`stream._transform()`][stream-_transform]. The `'end'` event is emitted
16941694after all data has been output, which occurs after the callback in
16951695[ ` transform._flush() ` ] [ stream-_flush ] has been called.
16961696
1697- #### transform.\ _ flush(callback)
1697+ #### transform._ flush(callback)
16981698
16991699* ` callback ` {Function} A callback function (optionally with an error
17001700 argument and data) to be called when remaining data has been flushed.
@@ -1709,20 +1709,20 @@ store an amount of internal state used to optimally compress the output. When
17091709the stream ends, however, that additional data needs to be flushed so that the
17101710compressed data will be complete.
17111711
1712- Custom [ Transform] [ ] implementations * may* implement the ` transform.\ _flush() `
1712+ Custom [ Transform] [ ] implementations * may* implement the ` transform._flush() `
17131713method. This will be called when there is no more written data to be consumed,
17141714but before the [ ` 'end' ` ] [ ] event is emitted signaling the end of the
17151715[ Readable] [ ] stream.
17161716
1717- Within the ` transform.\ _flush() ` implementation, the ` readable.push() ` method
1717+ Within the ` transform._flush() ` implementation, the ` readable.push() ` method
17181718may be called zero or more times, as appropriate. The ` callback ` function must
17191719be called when the flush operation is complete.
17201720
1721- The ` transform.\ _flush() ` method is prefixed with an underscore because it is
1721+ The ` transform._flush() ` method is prefixed with an underscore because it is
17221722internal to the class that defines it, and should never be called directly by
17231723user programs.
17241724
1725- #### transform.\ _ transform(chunk, encoding, callback)
1725+ #### transform._ transform(chunk, encoding, callback)
17261726
17271727* ` chunk ` {Buffer|String} The chunk to be transformed. Will ** always**
17281728 be a buffer unless the ` decodeStrings ` option was set to ` false ` .
@@ -1738,7 +1738,7 @@ should be implemented by child classes, and called only by the internal Readable
17381738class methods only.
17391739
17401740All Transform stream implementations must provide a ` _transform() `
1741- method to accept input and produce output. The ` transform.\ _transform() `
1741+ method to accept input and produce output. The ` transform._transform() `
17421742implementation handles the bytes being written, computes an output, then passes
17431743that output off to the readable portion using the ` readable.push() ` method.
17441744
@@ -1765,7 +1765,7 @@ transform.prototype._transform = function (data, encoding, callback) {
17651765};
17661766```
17671767
1768- The ` transform.\ _transform() ` method is prefixed with an underscore because it
1768+ The ` transform._transform() ` method is prefixed with an underscore because it
17691769is internal to the class that defines it, and should never be called directly by
17701770user programs.
17711771
0 commit comments