From 32fd0ac90156752c57ee719583446aa20535d52c Mon Sep 17 00:00:00 2001 From: Anto Aravinth Date: Sun, 19 May 2019 17:24:07 +0530 Subject: [PATCH] stream: use readableObjectMode public api for js stream PR-URL: https://github.com/nodejs/node/pull/27655 Refs: https://github.com/nodejs/node/issues/445 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Yongsheng Zhang --- doc/api/stream.md | 14 ++++++++++++++ lib/_stream_readable.js | 7 +++++++ lib/_stream_writable.js | 7 +++++++ lib/internal/js_stream_socket.js | 2 +- test/parallel/test-stream2-basic.js | 13 +++++++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 1e700e6f081350..79623662e43d86 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -502,6 +502,13 @@ This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`. +##### writable.writableObjectMode + + +Getter for the property `objectMode` of a given `Writable` stream. + ##### writable.write(chunk[, encoding][, callback]) + +Getter for the property `objectMode` of a given `Readable` stream. + ##### readable.resume()