Bulk Convert Entire Directory of Files with node

I have a project where I need to bulk convert large amounts of .png files to .jpgs, with some control over compression quality. I have found a script using the node module png-to-jpeg which works perfectly on individual files:

const fs = require("fs");
const pngToJpeg = require('png-to-jpeg');
 
let buffer = fs.readFileSync("input/1.png");
pngToJpeg({quality: 70})(buffer)
.then(output => fs.writeFileSync("output/1.jpg", output));

However, this is too cumbersome to do individually — I need to convert hundreds of files at a shot. I was hoping for some wildcard solution like:

let buffer = fs.readFileSync("input/*.png");
pngToJpeg({quality: 70})(buffer)
.then(output => fs.writeFileSync("output/*.jpg", output));

though that of course doesn't work, nor has any attempt I've done to loop through all the files, or using the node module glob. Appreciate any guidance that can be provided here.