UNPKG

agentsqripts

Version:

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

22 lines (18 loc) 529 B
/** * @file Check if content matches a template pattern * @description Single responsibility: Check content against a single template pattern */ /** * Check if content matches a template pattern */ function checkTemplateMatch(content, pattern) { let matchCount = 0; const lowerContent = content.toLowerCase(); for (const indicator of pattern.indicators) { if (lowerContent.includes(indicator)) { matchCount++; } } return matchCount >= pattern.threshold; } module.exports = checkTemplateMatch;