Some really awful solutions.

But this is the best one i’ve found.

async function printFiles() {
  const files = await getFilePaths();

  for await (const contents of files.map((file) => fs.readFile(file, "utf8"))) {
    console.log(contents);
  }
}

source