pansapiens / jase64

Compress JSON to URL-safe Base64

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Compress JSON to URL-safe Base64

License:MIT License


Languages

Language:TypeScript 100.0%