0

I have a lot of javascript files in a particular path. Every file has a lot of functions. As per my requirement, I've to document all function names in an excel sheet. So is there any way to automate these using any scripts or tools?

Expected output Format-> Filename - Function name

Sample -> samplejs.js - Test
Arun Kumar
  • 1,449
  • 1
  • 17
  • 33
  • Does this answer your question? [How to find JavaScript functions in a JavaScript (.js) file?](https://stackoverflow.com/questions/3853274/how-to-find-javascript-functions-in-a-javascript-js-file) – Timothy Alexis Vass Jul 26 '21 at 09:35

1 Answers1

0

The solution I found is -Show Functions VS Code Extension

Modified setting.json of this extension to get the JS files functions.

{
            "extensions": [
                ".ts",
                ".php",
                ".js"
            ],
            "native": "/(?:^|\\s)function\\s+\\w+\\(/mg",
            "display": "/\\s*function\\s+(\\w+)/1",
            "sort": 0
        },
Arun Kumar
  • 1,449
  • 1
  • 17
  • 33