agentsqripts
Version:
Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems
15 lines (13 loc) • 472 B
JavaScript
/**
* @file Extract dependency array from useEffect
* @description Single responsibility: Parse and extract useEffect dependency array
*/
/**
* Extract dependency array from useEffect
*/
function extractDependencyArray(lines, startIndex) {
const fullCode = lines.slice(startIndex, Math.min(startIndex + 20, lines.length)).join(' ');
const match = fullCode.match(/\[\s*([^\]]*)\s*\]/);
return match ? match[1] : null;
}
module.exports = extractDependencyArray;