Class DelimiterStream
Hierarchy
- TransformStream<Uint8Array, Uint8Array>
- DelimiterStream
Index
Constructors
Properties
Constructors
constructor
- new
Delimiter (delimiter, options?): DelimiterStreamStream Constructs a new instance.
Parameters
- delimiter: Uint8Array
A delimiter to split the stream by.
- options: DelimiterStreamOptions = {}
Options for the delimiter stream.
Returns DelimiterStream
- delimiter: Uint8Array
Divide a stream into chunks delimited by a given byte sequence.
If you are working with a stream of
string, consider usingTextDelimiterStream.Example
Divide a CSV stream by commas, discarding the commas:
Example
Divide a stream after semi-colons, keeping the semicolons in the output: