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

x/proc/tools/deps/proc.ts>toChunkedLines

A better way to work with processes in Deno.
Go to Latest
function toChunkedLines
Re-export
import { toChunkedLines } from "https://deno.land/x/proc@0.21.5/tools/deps/proc.ts";

Convert an AsyncIterable<Uint8Array> into an AsyncIterable<string[]> of lines.

For larger data sets and very small lines (like broken into one word per line), using this helps keep the data being passed at reasonable sizes and avoids the "small string" problem. Consider using this instead of toLines in that case.

Parameters

buffs: AsyncIterable<Uint8Array>

The iterable bytes.

Returns

AsyncIterable<string[]>