10LOC

#bun-write

Bunintermediate

Use Bun.write for zero-dependency file output

import { write } from "bun";

export const saveJsonReport = (path: string, report: Record<string, unknown>) =>
  write(path, JSON.stringify(report, null, 2) + "\n");

Write files in Bun without extra dependencies or shelling out.