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

x/proc/src/transformers.ts>toLines

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

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

There is a small performance penalty to using asynchronous iteration over using an array directly. If you are working with a very large data set and the strings you are working with are very small (e.g., word size), consider using toChunkedLines.

Parameters

buffs: AsyncIterable<Uint8Array>

The iterable bytes.

Returns

AsyncIterable<string>