summaryrefslogtreecommitdiff
path: root/doc/api/stream.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r--doc/api/stream.md32
1 files changed, 15 insertions, 17 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 252ed15cea..c2e5de79ef 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -873,7 +873,7 @@ added: v0.9.4
* `destination` {stream.Writable} The destination for writing data
* `options` {Object} Pipe options
- * `end` {boolean} End the writer when the reader ends. Defaults to `true`.
+ * `end` {boolean} End the writer when the reader ends. **Default:** `true`.
* Returns: {stream.Writable} making it possible to set up chains of piped
streams
@@ -1405,18 +1405,18 @@ changes:
* `options` {Object}
* `highWaterMark` {number} Buffer level when
- [`stream.write()`][stream-write] starts returning `false`. Defaults to
+ [`stream.write()`][stream-write] starts returning `false`. **Default:**
`16384` (16kb), or `16` for `objectMode` streams.
* `decodeStrings` {boolean} Whether or not to decode strings into
Buffers before passing them to [`stream._write()`][stream-_write].
- Defaults to `true`
+ **Default:** `true`.
* `objectMode` {boolean} Whether or not the
[`stream.write(anyObj)`][stream-write] is a valid operation. When set,
it becomes possible to write JavaScript values other than string,
`Buffer` or `Uint8Array` if supported by the stream implementation.
- Defaults to `false`
+ **Default:** `false`.
* `emitClose` {boolean} Whether or not the stream should emit `close`
- after it has been destroyed. Defaults to `true`
+ after it has been destroyed. **Default:** `true`.
* `write` {Function} Implementation for the
[`stream._write()`][stream-_write] method.
* `writev` {Function} Implementation for the
@@ -1666,12 +1666,12 @@ constructor and implement the `readable._read()` method.
* `options` {Object}
* `highWaterMark` {number} The maximum [number of bytes][hwm-gotcha] to store
in the internal buffer before ceasing to read from the underlying resource.
- Defaults to `16384` (16kb), or `16` for `objectMode` streams
+ **Default:** `16384` (16kb), or `16` for `objectMode` streams.
* `encoding` {string} If specified, then buffers will be decoded to
- strings using the specified encoding. Defaults to `null`
+ strings using the specified encoding. **Default:** `null`.
* `objectMode` {boolean} Whether this stream should behave
as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
- a single value instead of a Buffer of size n. Defaults to `false`
+ a single value instead of a Buffer of size n. **Default:** `false`.
* `read` {Function} Implementation for the [`stream._read()`][stream-_read]
method.
* `destroy` {Function} Implementation for the
@@ -1923,15 +1923,13 @@ changes:
* `options` {Object} Passed to both Writable and Readable
constructors. Also has the following fields:
- * `allowHalfOpen` {boolean} Defaults to `true`. If set to `false`, then
- the stream will automatically end the writable side when the
- readable side ends.
- * `readableObjectMode` {boolean} Defaults to `false`. Sets `objectMode`
- for readable side of the stream. Has no effect if `objectMode`
- is `true`.
- * `writableObjectMode` {boolean} Defaults to `false`. Sets `objectMode`
- for writable side of the stream. Has no effect if `objectMode`
- is `true`.
+ * `allowHalfOpen` {boolean} If set to `false`, then the stream will
+ automatically end the writable side when the readable side ends.
+ **Default:** `true`.
+ * `readableObjectMode` {boolean} Sets `objectMode` for readable side of the
+ stream. Has no effect if `objectMode` is `true`. **Default:** `false`.
+ * `writableObjectMode` {boolean} Sets `objectMode` for writable side of the
+ stream. Has no effect if `objectMode` is `true`. **Default:** `false`.
* `readableHighWaterMark` {number} Sets `highWaterMark` for the readable side
of the stream. Has no effect if `highWaterMark` is provided.
* `writableHighWaterMark` {number} Sets `highWaterMark` for the writable side