/ proof-of-concept / instrawave-compose
Sign in
proof-of-concept / instrawave-compose
instrawave-compose / src / numbl / source.ts
5 lines · 280 BCodeBlameHistory
2export function extractFunctionName(source: string): string | null {
3 const m = source.match(/^\s*function\s+(?:\[[^\]]*\]\s*=\s*|\w+\s*=\s*)?([A-Za-z]\w*)\s*\(/m);
4 return m ? m[1] : null;
5}
↑↓ move↵openescclose