Scope Analyzer

JSON →
library 2.1.2 ·javascript
verified May 27, 2026

scope-analyzer is a JavaScript library designed for performing basic scope analysis on JavaScript Abstract Syntax Trees (ASTs). It tracks variable scopes and collects references to variables within a given AST, enabling tasks like refactoring, renaming, and understanding variable usage patterns. The current stable version is 2.1.2. The package has seen consistent minor and patch releases, indicating active maintenance, though its stability badge still labels it as "experimental." A key differentiator is its focus on simplicity and direct manipulation of AST nodes, providing methods to crawl the tree, create, delete, and inspect scopes, and retrieve bindings and references. It is particularly useful for tools that need to understand the lexical environment of JavaScript code. It expects AST nodes to have a `.parent` property, often requiring a pre-processing step with utilities like `estree-assign-parent`.

total hits 19
actors 5 distinct systems
last hit 1d ago AhrefsBot
GPTBot
5
Script
1
ClaudeBot
1
Search engines
1

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇫🇷 France · 🇩🇪 Germany