From 0c66620c0340a1fbc5d3cc6d6b45082544867978 Mon Sep 17 00:00:00 2001 From: zoubin Date: Tue, 12 Jan 2016 13:22:42 +0800 Subject: [PATCH] doc: add docs for more stream options PR-URL: /~https://github.com/nodejs/node/pull/4639 Reviewed-By: James M Snell Reviewed-By: Chris Dickinson --- doc/api/stream.markdown | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index a0fcb81e9fab0b..7d5d8c420d6a81 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -856,6 +856,7 @@ implement Readable streams in your programs. * `objectMode` {Boolean} Whether this stream should behave as a stream of objects. Meaning that stream.read(n) returns a single value instead of a Buffer of size n. Default=false + * `read` {Function} Implementation for the [`_read()`][] method. In classes that extend the Readable class, make sure to call the Readable constructor so that the buffering settings can be properly @@ -1108,7 +1109,9 @@ also implement the `_flush()` method. (See below.) #### new stream.Transform([options]) * `options` {Object} Passed to both Writable and Readable - constructors. + constructors. Also has the following fields: + * `transform` {Function} Implementation for the [`_transform()`][] method. + * `flush` {Function} Implementation for the [`_flush()`][] method. In classes that extend the Transform class, make sure to call the constructor so that the buffering settings can be properly @@ -1296,6 +1299,8 @@ how to implement Writable streams in your programs. * `objectMode` {Boolean} Whether or not the `write(anyObj)` is a valid operation. If set you can write arbitrary data instead of only `Buffer` / `String` data. Default=false + * `write` {Function} Implementation for the [`_write()`][] method. + * `writev` {Function} Implementation for the [`_writev()`][] method. In classes that extend the Writable class, make sure to call the constructor so that the buffering settings can be properly