mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
13 lines
359 B
JavaScript
13 lines
359 B
JavaScript
// works in both bun & node
|
|
import { readFileSync } from "node:fs";
|
|
const count = parseInt(process.env.ITERATIONS || "1", 10) || 1;
|
|
|
|
const arg = process.argv.slice(1);
|
|
|
|
// TODO: remove Buffer.from() when readFileSync() returns Buffer
|
|
|
|
for (let i = 0; i < count; i++)
|
|
console.log(
|
|
arg.map((file) => Buffer.from(readFileSync(file, "utf8"))).join("")
|
|
);
|