Permalink
Browse files

Merge pull request #1 from substack/master

remove forEach, now works in ie<9
  • Loading branch information...
2 parents f27a198 + 790244f commit fab5d7136fec0de1b6a892518d34971414242698 @dominictarr committed Jan 23, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 index.js
View
@@ -24,15 +24,16 @@ function split (matcher, mapper) {
, pieces = (soFar + buffer).split(matcher)
soFar = pieces.pop()
- pieces.forEach(function (piece) {
+ for (var i = 0; i < pieces.length; i++) {
+ var piece = pieces[i]
if(mapper) {
piece = mapper(piece)
if('undefined' !== typeof piece)
stream.emit('data', piece)
}
else
stream.emit('data', piece)
- })
+ }
return true
},

0 comments on commit fab5d71

Please sign in to comment.