A minified bundle still has a shape
JavaScript Viewer is for reading source before you execute anything. Syntax highlighting from Ace separates keywords, strings, and calls so your eyes find structure in a wall of text. The outline lists function declarations, arrow bindings, class blocks, and top-level variables with a line number beside each name.
You are not debugging runtime behavior here. You are orienting yourself inside a file someone else wrote, or a build artifact you did not author.
The outline uses regular expressions on each line, not a full ECMAScript parser. Minified one-line files produce one crowded row. Nested arrow functions without a name on the same line stay hidden. Dynamic import(), eval, and string-built code never appear in the tree. For syntax errors, switch to the JavaScript Validator. For execution, use the JavaScript Playground.
Where this sits beside run, lint, and format
Four browser tools on Toolexe cover different moments in a review. Pick the tool for your current task.
| Tool | Best for | Does not do |
|---|---|---|
| JavaScript Viewer | Skim structure, jump by line, read counts | Run code, report syntax errors, reformat |
| Playground | Execute snippets, read console output | Outline a thousand-line module |
| Validator | Syntax errors with line numbers | Beautify or rename minified symbols |
| Beautifier | Expand minified code into readable blocks | Prove the code runs |
Typical order on a suspicious script: beautify first if the file is one line, view the outline here, validate syntax, then run a trimmed snippet in the playground.
What the line scanner catches on each line
Each pass walks the source line by line and applies patterns you would write in a quick code review.
function name()andasync function name()on a single line.class Namedeclarations.const foo = () =>style arrow bindings where the name sits before the equals sign.- Methods inside a class block, detected while the scanner still sees an open class above the line.
const,let,varat the top level, capped at ten rows in the outline so the list stays short.
Shapes outside those patterns fall through. Examples include immediately invoked function expressions with no assignment, object methods written as shorthand without a class wrapper, exported symbols split across lines, plus generator functions whose name sits on the previous line.
Walk-through on the sample file
Load the built-in sample to see the tree in action. You should see one class row, three method rows indented under the class context, two arrow function rows, one classic function row, and a handful of variable rows at the bottom.
class Calculator {add(a, b) { ... }
multiply(a, b) { ... }}
const fetchData = async (url) => { ... };function processUser(userData) { ... }Click Calculator in the outline. The editor cursor moves to the class line. Click add to land on the method. The counts below the editor update as you edit, so deleting a function drops the function total within a few hundred milliseconds.
Counts below the editor are estimates
Function totals add three separate regex passes: classic declarations, arrow patterns, and a broad method-shaped regex. A line like if (foo()) { might inflate the function count because the scanner sees parentheses followed by an opening brace.
Character totals include every byte in the editor, including spaces inside strings. Comment totals count // lines and block comments as whole matches, so a ten-line block comment adds one to the comment count, not ten.
None of these numbers replace a linter. They tell you whether a pasted file looks like a handful of helpers or a sprawling module before you commit time to a deeper read.
Nothing leaves your tab
Ace loads from a public CDN for syntax modes. Your source stays in the browser memory only. No upload step exists, so client scripts from a closed project stay on your machine. Clear the editor when you finish if the machine is shared.
For output you want to share, copy the source with the toolbar button, or run the same text through the JavaScript Pretty Print page when you need expanded indentation without leaving the category.
