jsonsquasher
v0.2.0
Published
Lightweight and efficient JSON compressor
Downloads
2
Readme
Install
npm install jsonsquasher --save
Include
NodeJS
const jsonsquasher = require('jsonsquasher');
Browser
<script src='node_modules/jsonsquasher/build/jsonsquasher.js' type='text/javascript'></script>
...or use ES6 import
Use
// Compression
const compressedJson = jsonsquasher.compress(json);
// Decompression
const decompressedJson = jsonsquasher.compress(compressedJson);
// Faster and less memory usage, but with JSON mutation
console.log(json);
jsonsquasher.compress(json,{mutateJSON:true});
jsonsquasher.decompress(json,{mutateJSON:true});
console.log(json);