Open this example in the interactive library
Source code
import { posix as path } from "node:path";
console.log(path.format({ dir: "/data", name: "report", ext: ".csv" }));
Sample output
/data/report.csv

Open this example in the interactive library
import { posix as path } from "node:path";
console.log(path.format({ dir: "/data", name: "report", ext: ".csv" }));
/data/report.csv