js-shrink

JSON →
library 1.0.19 ·javascript
verified Jun 4, 2026

js-shrink is a supplemental JavaScript minifier that shortens string literals, property names, variable names, and built-in values by replacing frequently used strings with short variable declarations. It preserves property names (no mangling) for safety, making it less effective than full mangling but safe for all property names. This package is typically used alongside a standard minifier like Terser for additional size reduction. It is released on npm under MIT license and receives occasional updates. Key differentiators: focuses on string and property name shortening without mangling, supports source maps, and allows fine-grained control through many options.