Documentation
¶
Overview ¶
Package minify implements a token-aware JavaScript minifier used to shrink the embedded runtime sources before they're served.
Scope (tier-2):
- Strip line + block comments.
- Collapse whitespace, preserving newlines only where ASI cares.
- Distinguish regex literals from division.
- Preserve string + template-literal payloads byte-for-byte.
- Insert a single space when removing whitespace would fuse two adjacent tokens (`let a` → `leta`, `+ +` → `++`, `/ /` → `//`).
Out of scope (would be tier-3): identifier renaming, dead-code elimination, constant folding, anything that requires a parser.
The output is intentionally still valid, readable-ish JavaScript — it stays parseable by the browser without source maps and a developer can still set breakpoints inside it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.