A lightweight JSON minifier that removes whitespace and comments from JWCC (JSON with Commas and Comments) or HuJSON (Human JSON). Version 1.0.0 is the current stable release. It supports single-line (//) and multi-line (/* */) comments, removes trailing commas, and strips all whitespace. It is fault-tolerant (handles invalid JSON), has zero dependencies, and uses no regular expressions. Compared to alternatives, it is minimal and strictly focused on JWCC/HuJSON input.
npm install jwccminifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates usage of jwccminify and jwccstrip to minify or strip comments from JWCC/HuJSON.
Validate JSON separately (e.g., with JSON.parse) if you need to ensure validity.
Use jwccminify instead of jwccstrip if you want to fully remove whitespace.
Avoid input where string values contain comment markers.
Access via window.JwccMinify or import from the ES module.
npm install jwccminify
Use import { jwccminify } from 'jwccminify'; or check bundler config.Ensure <script src="./dist/jwccminify.umd.js"> is included and use window.JwccMinify.
No dependency data recorded yet.