Convert a readable stream to a string
const chunks = []; for await (const chunk of stream) chunks.push(chunk); const str = Buffer.concat(chunks).toString('utf-8');
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