@@ -63,8 +63,8 @@ object mode is not safe.
6363<!-- type=misc-->
6464
6565Both [ Writable] [ ] and [ Readable] [ ] streams will store data in an internal
66- buffer that can be retrieved using ` writable._writableState.getBuffer() ` or
67- ` readable._readableState.buffer ` , respectively.
66+ buffer that can be retrieved using ` writable.writableBuffer ` or
67+ ` readable.readableBuffer ` , respectively.
6868
6969The amount of data potentially buffered depends on the ` highWaterMark ` option
7070passed into the streams constructor. For normal streams, the ` highWaterMark `
@@ -602,22 +602,22 @@ Readable stream implementation.
602602Specifically, at any given point in time, every Readable is in one of three
603603possible states:
604604
605- * ` readable._readableState.flowing = null `
606- * ` readable._readableState.flowing = false `
607- * ` readable._readableState.flowing = true `
605+ * ` readable.readableFlowing = null `
606+ * ` readable.readableFlowing = false `
607+ * ` readable.readableFlowing = true `
608608
609- When ` readable._readableState.flowing ` is ` null ` , no mechanism for consuming the
609+ When ` readable.readableFlowing ` is ` null ` , no mechanism for consuming the
610610streams data is provided so the stream will not generate its data. While in this
611611state, attaching a listener for the ` 'data' ` event, calling the ` readable.pipe() `
612612method, or calling the ` readable.resume() ` method will switch
613- ` readable._readableState.flowing ` to ` true ` , causing the Readable to begin
613+ ` readable.readableFlowing ` to ` true ` , causing the Readable to begin
614614actively emitting events as data is generated.
615615
616616Calling ` readable.pause() ` , ` readable.unpipe() ` , or receiving "back pressure"
617- will cause the ` readable._readableState.flowing ` to be set as ` false ` ,
617+ will cause the ` readable.readableFlowing ` to be set as ` false ` ,
618618temporarily halting the flowing of events but * not* halting the generation of
619619data. While in this state, attaching a listener for the ` 'data' ` event
620- would not cause ` readable._readableState.flowing ` to switch to ` true ` .
620+ would not cause ` readable.readableFlowing ` to switch to ` true ` .
621621
622622``` js
623623const { PassThrough , Writable } = require (' stream' );
@@ -626,14 +626,14 @@ const writable = new Writable();
626626
627627pass .pipe (writable);
628628pass .unpipe (writable);
629- // flowing is now false
629+ // readableFlowing is now false
630630
631631pass .on (' data' , (chunk ) => { console .log (chunk .toString ()); });
632632pass .write (' ok' ); // will not emit 'data'
633633pass .resume (); // must be called to make 'data' being emitted
634634```
635635
636- While ` readable._readableState.flowing ` is ` false ` , data may be accumulating
636+ While ` readable.readableFlowing ` is ` false ` , data may be accumulating
637637within the streams internal buffer.
638638
639639#### Choose One
0 commit comments