Write content to a file with fs.writeFileSync
require('fs').writeFileSync('output.txt', 'content');
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
Parse JSON without try-catch crashing your app