Whether or not a file is calling a particular function
npm install is-calling-function
Usage
var isCallingFunction = ; var result = ;
- Note: you can also pass an AST as the source for reuse and to avoid double-parsing.
- Handles function declarations, function member expressions, and IIFEs
Shell usage (requires global install -g
)
is-calling-function filename functionName