(rel: string, content: string, functionName: string)
| 181 | * depends on (free variables). Convenience wrapper for the data_flow tool. |
| 182 | */ |
| 183 | export async function dependenciesOf(rel: string, content: string, functionName: string): Promise<string[]> { |
| 184 | const flows = await analyzeDataFlow(rel, content); |
| 185 | const match = flows.find(f => f.name === functionName) |
| 186 | ?? flows.find(f => f.name.toLowerCase() === functionName.toLowerCase()); |
| 187 | return match ? match.freeVars.map(v => v.name) : []; |
| 188 | } |
no test coverage detected