diff --git a/package.json b/package.json index 85087ea..f99159e 100644 --- a/package.json +++ b/package.json @@ -28,5 +28,8 @@ "transduce": "^0.8.0", "transducers-js": "^0.4.158", "transducers.js": "^0.3.1" + }, + "dependencies": { + "readable-stream": "^2.3.5" } } diff --git a/test/test.js b/test/test.js index 4d4d9e2..0f9ab7b 100644 --- a/test/test.js +++ b/test/test.js @@ -1,14 +1,16 @@ "use strict" var stream = require('../'), - Readable = require('stream').Readable, - Writable = require('stream').Writable, + Readable = require('readable-stream').Readable, + Writable = require('readable-stream').Writable, string = require('transduce/string'), tap = require('transduce/transducers/tap'), transduce = require('any-transduce'), test = require('tape') -function readArray(source){ - var read = new Readable() + +function readArray(_source){ + var source = _source.concat(null), + read = new Readable() read._read = function(){ read.push(source.shift()) } diff --git a/transduce-stream.js b/transduce-stream.js index 3ac9e35..9fde1b2 100644 --- a/transduce-stream.js +++ b/transduce-stream.js @@ -1,6 +1,6 @@ "use strict" var util = require('util'), - Transform = require('stream').Transform + Transform = require('readable-stream').Transform module.exports = TransduceStream