We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 118f9bc commit dafe7d9Copy full SHA for dafe7d9
lib/internal/streams/readable.js
@@ -36,6 +36,8 @@ const {
36
Symbol,
37
} = primordials;
38
39
+module.exports = Readable;
40
+
41
const EE = require('events');
42
const { Stream, prependListener } = require('internal/streams/legacy');
43
const { Buffer } = require('buffer');
@@ -1708,5 +1710,7 @@ Readable.wrap = function(src, options) {
1708
1710
}).wrap(src);
1709
1711
};
1712
-module.exports = Readable;
-Readable.ReadableState = ReadableState;
1713
+// Allow using ReadableState as function
1714
+Readable.ReadableState = function(...args) {
1715
+ return new ReadableState(...args);
1716
+};
0 commit comments