UNPKG

agentsqripts

Version:

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

26 lines (22 loc) 595 B
/** * @file Generate base class code * @description Single responsibility: Create base class implementation */ function generateBaseClassCode(methods, className) { const methodImplementations = methods.map(method => ` ${method}() { // Shared implementation throw new Error('Method ${method} must be implemented by subclass'); }`).join('\n'); return `/** * Base class for shared functionality */ class ${className} { constructor() { // Common initialization } ${methodImplementations} } module.exports = ${className};`; } module.exports = generateBaseClassCode;