nested-write.js
This file
Path
test/fixtures/nested-write.js
8 lines · 295 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
123456789#!/usr/bin/env nodeimport {writeFile} from 'node:fs/promises';import {text} from 'node:stream/consumers';import process from 'node:process';
const [filePath, bytes] = process.argv.slice(2);const stdinString = await text(process.stdin);await writeFile(filePath, `${stdinString} ${bytes}`);