A configurable two-way JSON minifier that reduces payload size by replacing long keys with short generated ones, producing a translation dictionary. Current stable version 1.0.1. Release cadence is low (last update years ago). Key differentiator: supports reversible compression (minify and restore) and custom key generators. Suitable for both client and server (Node.js, browser via UMD).
npm install jminorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a dictionary, compresses an object by shortening keys, then decompresses back to original keys.
Always call dictionary.fromJSON(data) before compressing, or use import/export of dictionary.
If needed, preserve empty structures by adjusting compression options (e.g., keepEmpty).
Ensure consistent key structure across all objects in arrays, or use extendWith() to add keys from all objects.
Use named import: import { createDictionary } from 'jminor'; const dict = createDictionary();Always call dictionary.fromJSON(originalData) BEFORE compress(originalData, dictionary).
Use require('jminor').decompress (or destructure with correct casing).No dependency data recorded yet.