Skip to main content
Module

x/proc/mod3.ts>buffer

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

Transformer that conditionally forces buffering of a Uint8Array stream.

This enforces that the size of the passed data is at least size. Note that data is never reduced in size. It is either passed through unchanged (if it is big enough already) or held and concatenated with the next data until it there is enough data to write through.

If size is 0 or negative, the input data is passed through unaltered.

Parameters

optional
size = [UNSUPPORTED]

Returns

(iter: AsyncIterable<Uint8Array>) => AsyncIterable<Uint8Array>