Closed rauchg closed 6 years ago
FWIW, for others who might arrive to this issue: switching to split2
by @mcollina addresses my concern (it returns if max buffer is reached).
In addition, @mcollina's has the subtle difference of also applying the maxLength
policy to any write
, not just buffered writes, which I think is a good decision.
Thanks @rauchg. split2 is based on Streams3, and most of these things come "for free", because of that. I would also want to note that split2 fully respects utf-8 boundaries.
split2 is unfortunately slower than split. However I haven't seen it having a big impact in real-life situations. If you care about speed you can try http://npm.im/syncsplit.
@rauchg you are right, this should return there.
fixed in 1.0.1
Should this issue be closed now? The other two open issues look resolved to me too.
https://github.com/dominictarr/split/blob/master/index.js#L45
There's no
return
after theerror
is emitted. Is this by design?