Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/proc/src/transformers.ts>toLines

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Very Popular
Go to Latest
function toLines
import { toLines } from "https://deno.land/x/proc@0.20.18/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>