Skip to content

Commit

Permalink
Add null to the end of the source array in readArray to close the str…
Browse files Browse the repository at this point in the history
…eam. Fixes transduce#2
  • Loading branch information
jwerth committed Mar 16, 2018
1 parent f15d20c commit 6de9482
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ var stream = require('../'),
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())
}
Expand Down

0 comments on commit 6de9482

Please sign in to comment.