nested-write.js
This file
Path
test/fixtures/nested-write.js
8 lines · 295 bytes · JavaScript
Last changed by
Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac
History of this fileTake it
Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac
lines 1–8why, one step back1#!/usr/bin/env node2import {writeFile} from 'node:fs/promises';3import {text} from 'node:stream/consumers';4import process from 'node:process';56const [filePath, bytes] = process.argv.slice(2);7const stdinString = await text(process.stdin);8await writeFile(filePath, `${stdinString} ${bytes}`);