UNPKG

agentsqripts

Version:

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

15 lines (13 loc) 393 B
/** * @file Find pattern in range of lines * @description Single responsibility: Search for pattern within specified line range */ function findPatternInRange(lines, startIndex, endIndex, pattern) { for (let i = startIndex; i < Math.min(endIndex, lines.length); i++) { if (pattern.test(lines[i])) { return true; } } return false; } module.exports = findPatternInRange;