stdin-distinct-both.js
This file
Path
test/fixtures/stdin-distinct-both.js
7 lines · 224 bytes · JavaScript
Last changed by
Expose the destination subprocess methods on `.pipe()` (#1252)Sindre Sorhusbefore adoptionc31c94c
History of this fileTake it
Expose the destination subprocess methods on `.pipe()` (#1252)Sindre Sorhusbefore adoptionc31c94c
lines 1–7why, one step back1#!/usr/bin/env node2import process from 'node:process';3import {text} from 'node:stream/consumers';45const input = await text(process.stdin);6process.stdout.write(`${input}:stdout`);7process.stderr.write(`${input}:stderr`);