Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
class DelimiterStream
extends TransformStream<Uint8Array, Uint8Array>
import { DelimiterStream } from "";

Transform a stream into a stream where each chunk is divided by a given delimiter.

import { DelimiterStream } from "";
const res = await fetch("");
const parts = res.body!
  .pipeThrough(new DelimiterStream(new TextEncoder().encode("foo")))
  .pipeThrough(new TextDecoderStream());


DelimiterStream(delimiter: Uint8Array)