summaryrefslogtreecommitdiff
path: root/lib/_stream_readable.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_stream_readable.js')
-rw-r--r--lib/_stream_readable.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
index d2de4122bb..5b73646db8 100644
--- a/lib/_stream_readable.js
+++ b/lib/_stream_readable.js
@@ -1075,6 +1075,13 @@ Object.defineProperty(Readable.prototype, 'readableObjectMode', {
}
});
+Object.defineProperty(Readable.prototype, 'readableEncoding', {
+ enumerable: false,
+ get() {
+ return this._readableState ? this._readableState.encoding : null;
+ }
+});
+
// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
// This function is designed to be inlinable, so please take care when making