split
Advanced tools
Comparing version 0.2.10 to 0.3.0
@@ -15,5 +15,6 @@ //filter will reemit the data if cb(err,pass) pass is truthy | ||
function split (matcher, mapper) { | ||
function split (matcher, mapper, options) { | ||
var decoder = new Decoder() | ||
var soFar = '' | ||
var maxLength = options && options.maxLength; | ||
if('function' === typeof matcher) | ||
@@ -43,2 +44,5 @@ mapper = matcher, matcher = null | ||
if (maxLength && soFar.length > maxLength) | ||
stream.emit('error', new Error('maximum buffer reached')) | ||
for (var i = 0; i < pieces.length; i++) { | ||
@@ -45,0 +49,0 @@ var piece = pieces[i] |
{ | ||
"name": "split", | ||
"version": "0.2.10", | ||
"version": "0.3.0", | ||
"description": "split a Text Stream into a Line Stream", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/dominictarr/split", |
Sorry, the diff of this file is not supported yet
10019
11
225
55