Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/proc/src/transformers.ts>toByteLines

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Go to Latest
function toByteLines
import { toByteLines } from "https://deno.land/x/proc@0.20.22/src/transformers.ts";

Convert an AsyncIterable<Uint8Array> into an AsyncIterable<Uint8Array[]> (an array of lines chunked together based on buffer size) split on lf and also suppressing trailing cr. lf and trailing cr is removed from the returned lines.

Parameters

buffs: AsyncIterable<Uint8Array>

The iterable bytes.

Returns

AsyncIterable<Uint8Array[]>