[Pkg-javascript-commits] [node-read-only-stream] 04/22: wrap
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 20 13:52:18 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-read-only-stream.
commit f739f231a42137d29b690daffdf2485b49368b98
Author: James Halliday <mail at substack.net>
Date: Mon Sep 8 11:21:35 2014 +0100
wrap
---
index.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/index.js b/index.js
index 07f7e58..ccac147 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,10 @@
var Readable = require('readable-stream/readable');
+var rwrap = require('readable-wrap');
module.exports = function (stream) {
var opts = stream._readableState;
+ if (typeof stream.read !== 'function') stream = rwrap(stream, opts);
+
var ro = new Readable({ objectMode: opts && opts.objectMode });
var waiting = false;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-read-only-stream.git
More information about the Pkg-javascript-commits
mailing list