is-calling-function

1.0.4 • Public • Published

is-calling-function npm npm

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

Readme

Keywords

Package Sidebar

Install

npm i is-calling-function

Weekly Downloads

4

Version

1.0.4

License

MIT

Last publish

Collaborators

  • pahen
  • xhmikosr
  • mrjoelkemp