Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from substack/master

remove forEach, now works in ie<9
  • Loading branch information...
commit fab5d7136fec0de1b6a892518d34971414242698 2 parents f27a198 + 790244f
@dominictarr authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 index.js
View
5 index.js
@@ -24,7 +24,8 @@ 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)
@@ -32,7 +33,7 @@ function split (matcher, mapper) {
}
else
stream.emit('data', piece)
- })
+ }
return true
},
Please sign in to comment.
Something went wrong with that request. Please try again.