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

x/proc/mod3.ts>Process#writeToStdin

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Very Popular
Go to Latest
method Process.prototype.writeToStdin
import { Process } from "https://deno.land/x/proc@0.20.18/mod3.ts";

This is the "backdoor" way to write directly to the underlying process stdin without the overhead of a WritableIterable. Use instead of stdin for streamed data.

stdin is the way to go if you are passing ad-hoc, non-continuous data to process stdin. However, it adds a substantial amount of overhead, and it is very slow for processing small data. Using this function instead of stdin greatly improves performance where small data is a factor.

Parameters

iter: AsyncIterable<
| Uint8Array
| Uint8Array[]
| string
| string[]
>

The data being passed to the underlying process stdin.