@@ -354,6 +354,19 @@ buffered writes in a more optimized manner.
354
354
355
355
See also: [ ` writable.uncork() ` ] [ ] .
356
356
357
+ ##### writable.destroy([ error] )
358
+ <!-- YAML
359
+ added: v8.0.0
360
+ -->
361
+
362
+ * Returns: {this}
363
+
364
+ Destroy the stream, and emit the passed ` error ` and a ` close ` event.
365
+ After this call, the writable stream has ended and subsequent calls
366
+ to ` write ` / ` end ` will give an ` ERR_STREAM_DESTROYED ` error.
367
+ Implementors should not override this method,
368
+ but instead implement [ ` writable._destroy ` ] [ writable-_destroy ] .
369
+
357
370
##### writable.end([ chunk] [ , encoding ] [ , callback] )
358
371
<!-- YAML
359
372
added: v0.9.4
@@ -536,19 +549,6 @@ write('hello', () => {
536
549
537
550
A Writable stream in object mode will always ignore the ` encoding ` argument.
538
551
539
- ##### writable.destroy([ error] )
540
- <!-- YAML
541
- added: v8.0.0
542
- -->
543
-
544
- * Returns: {this}
545
-
546
- Destroy the stream, and emit the passed ` error ` and a ` close ` event.
547
- After this call, the writable stream has ended and subsequent calls
548
- to ` write ` / ` end ` will give an ` ERR_STREAM_DESTROYED ` error.
549
- Implementors should not override this method,
550
- but instead implement [ ` writable._destroy ` ] [ writable-_destroy ] .
551
-
552
552
### Readable Streams
553
553
554
554
Readable streams are an abstraction for a * source* from which data is
@@ -806,6 +806,20 @@ In general, the `readable.pipe()` and `'data'` event mechanisms are easier to
806
806
understand than the ` 'readable' ` event. However, handling ` 'readable' ` might
807
807
result in increased throughput.
808
808
809
+ ##### readable.destroy([ error] )
810
+ <!-- YAML
811
+ added: v8.0.0
812
+ -->
813
+
814
+ * ` error ` {Error} Error which will be passed as payload in ` 'error' ` event
815
+ * Returns: {this}
816
+
817
+ Destroy the stream, and emit ` 'error' ` and ` close ` . After this call, the
818
+ readable stream will release any internal resources and subsequent calls
819
+ to ` push ` will be ignored.
820
+ Implementors should not override this method, but instead implement
821
+ [ ` readable._destroy ` ] [ readable-_destroy ] .
822
+
809
823
##### readable.isPaused()
810
824
<!-- YAML
811
825
added: v0.11.14
@@ -913,16 +927,6 @@ to prevent memory leaks.
913
927
The [ ` process.stderr ` ] [ ] and [ ` process.stdout ` ] [ ] Writable streams are never
914
928
closed until the Node.js process exits, regardless of the specified options.
915
929
916
- ##### readable.readableHighWaterMark
917
- <!-- YAML
918
- added: v9.3.0
919
- -->
920
-
921
- * Returns: {number}
922
-
923
- Returns the value of ` highWaterMark ` passed when constructing this
924
- ` Readable ` .
925
-
926
930
##### readable.read([ size] )
927
931
<!-- YAML
928
932
added: v0.9.4
@@ -969,6 +973,16 @@ also be emitted.
969
973
Calling [ ` stream.read([size]) ` ] [ stream-read ] after the [ ` 'end' ` ] [ ] event has
970
974
been emitted will return ` null ` . No runtime error will be raised.
971
975
976
+ ##### readable.readableHighWaterMark
977
+ <!-- YAML
978
+ added: v9.3.0
979
+ -->
980
+
981
+ * Returns: {number}
982
+
983
+ Returns the value of ` highWaterMark ` passed when constructing this
984
+ ` Readable ` .
985
+
972
986
##### readable.readableLength
973
987
<!-- YAML
974
988
added: v9.4.0
@@ -1168,20 +1182,6 @@ myReader.on('readable', () => {
1168
1182
});
1169
1183
```
1170
1184
1171
- ##### readable.destroy([ error] )
1172
- <!-- YAML
1173
- added: v8.0.0
1174
- -->
1175
-
1176
- * ` error ` {Error} Error which will be passed as payload in ` 'error' ` event
1177
- * Returns: {this}
1178
-
1179
- Destroy the stream, and emit ` 'error' ` and ` close ` . After this call, the
1180
- readable stream will release any internal resources and subsequent calls
1181
- to ` push ` will be ignored.
1182
- Implementors should not override this method, but instead implement
1183
- [ ` readable._destroy ` ] [ readable-_destroy ] .
1184
-
1185
1185
##### readable[ @@asyncIterator ]
1186
1186
<!-- YAML
1187
1187
added: REPLACEME
0 commit comments