HyperCrush (v1.0.21) is a Node.js module for aggressively minifying HTML and SVG markup beyond standard minifiers. It removes leading zeros from decimals, strips unnecessary quotes from attribute values, eliminates whitespace between tags and attributes, and compresses SVG for inline DOM usage. Designed as a Gulp plugin or standalone tool, it complements html-minifier and terser. Unlike general-purpose minifiers, HyperCrush focuses on edge-case savings (e.g., `0.5` → `.5`). Maintained on GitHub but infrequently updated.
npm install hypercrushNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows Gulp integration for HTML minification (using html-minifier then HyperCrush 'all' mode) and SVG crushing with 'svg' mode.
Use explicit spacing or CSS flexbox/grid instead of relying on whitespace.
Do NOT use 'svg' mode for files loaded via <img src=...> or as standalone SVG. Only use for inline SVG in HTML.
Run `npm install hypercrush` without `-S`.
If leading zeros are required, avoid using default/all mode, or post-process to re-add zeros.
Test output thoroughly; ensure attribute values don't contain spaces, reserved characters, or URL fragments that require quotes.
Convert your file to ESM (use `import` or rename to `.mjs`) or use dynamic import: `const hypercrush = (await import('hypercrush')).default;`Use default import: `import hypercrush from 'hypercrush'`
Use it as a Gulp plugin: `.pipe(hypercrush())` or call with mode: `hypercrush('all')` inside a pipeline.No dependency data recorded yet.