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

x/proc/src/transformers.ts

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Very Popular
Go to Latest
import * as proc from "https://deno.land/x/proc@0.20.24/src/transformers.ts";

Functions

Transformer that conditionally adds buffering to a Uint8Array stream.

Decompress a gzip compressed stream.

Convert JSON-encoded lines into objects.

Convert objects into JSON-encoded lines.

Convert Uint8Array to text. The text is not split into lines, so it will contain lf and cr in arbitrary places. Conversion is done as data is received, so this is good for passing stderr and/or stdout data that shows progress (only cr or other positioning codes).

Convert (non line-delimited) text into utf-8 encoded bytes.

Transform text in "chunk" form into lines.

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.

Converts specific types to Uint8Array chunks.

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

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

Convert a TransformStream into a Transformer. Errors occurring upstream are correctly propagated through the transformation.

Type Aliases

Type signature of a transformer.