Let's take a simple example, fs.stat. I can promisify fs.stat and write:
const stats = await stat(file, fs.constants.R_OK);
but if the file doesn't exist this throws. Other than wrapping every await in a try/catch, is there a clean pattern or wrapping library that can be used here? Something that perhaps ends up with stats === undefined | null?