Skip to content
This repository has been archived by the owner on Jul 5, 2019. It is now read-only.

Commit

Permalink
pausable
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Feb 5, 2013
1 parent a1e520d commit bc2447e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,16 @@ function split (matcher, mapper) {
if(mapper) {
piece = mapper(piece)
if('undefined' !== typeof piece)
stream.emit('data', piece)
stream.queue(piece)
}
else
stream.emit('data', piece)
stream.queue(piece)
}

return true
},
function () {
if(soFar)
this.emit('data', soFar)
this.emit('end')
this.queue(soFar)
this.queue(null)
})
}

0 comments on commit bc2447e

Please sign in to comment.