UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

26 lines (22 loc) 745 B
/** * @file Format recommendations utility * @description Single responsibility: Format recommendation lists */ /** * Format recommendations list * @param {Array} recommendations - Array of recommendation strings or objects * @param {string} title - Section title * @returns {string} Formatted recommendations */ function formatRecommendations(recommendations, title = '💡 Recommendations') { if (!recommendations || recommendations.length === 0) { return ''; } let output = `${title}:\n`; recommendations.forEach(rec => { const text = typeof rec === 'string' ? rec : (rec.description || rec.text || rec); output += ` • ${text}\n`; }); return output + '\n'; } module.exports = formatRecommendations;