A Powerful AST Utility for Improved Decision-Making and Comprehensible Code

Summary of my bookmarked Github repositories from Apr 11th, 2022

Github repositories

  • twolfson/ecma-variable-scope

    "ecma-variable-scope" is an AST utility that helps collect scope information for variables. It addresses the challenge of scope detection, especially when dealing with the 'with' statement. The tool extracts relevant information to aid decision-making. Originally developed for the esformatter-phonetic plugin, which enhances the comprehensibility of obfuscated variable names. Features include support for detecting 'with' usage, compatibility with 'let' and 'const', handling of destructured variables, and arrow expressions. The tool is installed via npm and integrates with esprima for analyzing the abstract syntax tree (AST). It adds scope and scopeInfo properties to appropriate nodes in the AST, providing details about variable scopes, identifiers, and their usage.