jsonsquasher

0.2.0 • Public • Published

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);

Package Sidebar

Install

npm i jsonsquasher

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • ipavlov