UNPKG

agentsqripts

Version:

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

14 lines (12 loc) 370 B
/** * @file Extract function name from line * @description Single responsibility: Parse and extract function name from code line */ /** * Extract function name from line */ function extractFunctionName(line) { const match = line.match(/const\s+(\w+)\s*=|function\s+(\w+)/); return match ? (match[1] || match[2]) : null; } module.exports = extractFunctionName;