Permalink
Browse files

for loop instead of forEach for ie<9

  • Loading branch information...
1 parent f27a198 commit 790244f5a9d2bf4f87c0533889636d7b26aa567e @substack committed Jan 22, 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 790244f

Please sign in to comment.