JSClassFinder: A Tool to Detect Class-like Structures in JavaScript
This tool addresses the need for better code analysis in web applications by detecting emulated classes in JavaScript, but it is incremental as it builds on existing parsing and visualization techniques.
The authors tackled the problem of identifying class-like structures in JavaScript code to improve reliability and maintainability, resulting in a reengineering tool that parses ASTs and integrates with the Moose platform for visualization and metrics.
With the increasing usage of JavaScript in web applications, there is a great demand to write JavaScript code that is reliable and maintainable. To achieve these goals, classes can be emulated in the current JavaScript standard version. In this paper, we propose a reengineering tool to identify such class-like structures and to create an object-oriented model based on JavaScript source code. The tool has a parser that loads the AST (Abstract Syntax Tree) of a JavaScript application to model its structure. It is also integrated with the Moose platform to provide powerful visualization, e.g., UML diagram and Distribution Maps, and well-known metric values for software analysis. We also provide some examples with real JavaScript applications to evaluate the tool.