UNPKG

agentsqripts

Version:

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

13 lines (11 loc) 470 B
/** * @file Check if difference is only in string literals * @description Single responsibility: Detect if two lines differ only in string values */ function isStringLiteralDifference(line1, line2) { if (!line1 || !line2) return false; const normalized1 = line1.replace(/['"`]([^'"`]*?)['"`]/g, 'STRING'); const normalized2 = line2.replace(/['"`]([^'"`]*?)['"`]/g, 'STRING'); return normalized1 === normalized2; } module.exports = isStringLiteralDifference;