Wondering what’s next for npm?Check out our public roadmap! »

my-funcs

1.0.0 • Public • Published

my-funcs Travis branch Coverage Status

Get a list of all of the named functions you defined in your project

NOTE: This depends on deep-ast which uses synchronous I/O and should not be used at request time.

API

myFuncs : (filename: String) => (() => Array<String>|Error)

my-funcs exposes one function which takes a filename. the file is loaded and then a deep-ast is generated based on the file. The AST is then traversed and each named function is found and returned.

Install

npm install --save my-funcs

Example

Running on it's own source, my-funcs will generate a list of functions:

var myFuncs = require('myFuncs');
console.log(myFuncs('./index.js'));
 
// ['myFuncs', 'getNames', 'findFunctions', 'findFunction', 'getFunctionNameFromNode']

Keywords

none

Install

npm i my-funcs

DownloadsWeekly Downloads

2

Version

1.0.0

License

none

Last publish

Collaborators

  • avatar