remove forEach, now works in ie<9 #1

Merged
merged 1 commit into from Jan 23, 2013
+3 −2
View
5 index.js
@@ -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
},