Skip to content

zrrrzzt/jcb64

Repository files navigation

Build Status Coverage Status js-standard-style

jcb64

Convert json to string, compress it and return a urlsafe base64 encoded string.

And the other way around.

Usage

const { pack, unpack } = require('jcb64')
const data = {
  "key": "value"
}
const b64 = pack(data)

console.log('b64') //=> eJyrVspOrVSyUipLzClNVaoFAChMBSE

const json = unpack(b64)

console.log(json) //=> {key: 'value'}

License

MIT