is-calling-function
v1.0.4
Published
Whether or not a file is calling a particular function
Downloads
22
Readme
is-calling-function
Whether or not a file is calling a particular function
npm install is-calling-function
Usage
var isCallingFunction = require('is-calling-function');
var result = isCallingFunction(source, functionName);
- 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