Parse JSON without try-catch crashing your app
const safeParse = (str) => { try { return JSON.parse(str) } catch { return null } };
Check if a path exists and is a directory
Add a timeout to fetch requests using AbortController
Get the directory of the currently running script
Access environment variables in Node.js