CodeInspector

Static analysis of your code.

DocumentationAuthor

import CodeInspector from 'code-inspector';

const analysis = CodeInspector.analyze(code);

or

<script src="https://unpkg.com/code-inspector@latest/browser/code-inspector.js"></script>
<script>
  const analysis = CodeInspector.analyze(code);
</script>

Where you may need this?

I used it in a VSCode extension where I analyze the currently open file and provide a quick shortcut to the function scopes. So, every task that requires work with the abstract syntax tree may get some help from this tool.