Jase64
Compress JSON to URL-safe Base64
See also: JSONCrush (smaller library, better compression for small JSON blobs)
Installing
npm install jase64
Using
import Jase64 from 'jase64';
const data = {some: "big data", structure: "with stuff"};
const b64ed = Jase64.compress(data);
console.log(b64ed); //
const origData = Jase64.decompress(b64ed);
console.assert(JSON.stringify(data) === JSON.stringify(origData));