https://github.com/lagden/jsonb
Compress or decompress JSON
https://github.com/lagden/jsonb
base64 buffer compress decompress json jsonb
Last synced: about 1 month ago
JSON representation
Compress or decompress JSON
- Host: GitHub
- URL: https://github.com/lagden/jsonb
- Owner: lagden
- License: mit
- Created: 2019-03-18T23:50:06.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-20T17:40:55.000Z (almost 3 years ago)
- Last Synced: 2025-04-03T14:15:36.335Z (about 1 year ago)
- Topics: base64, buffer, compress, decompress, json, jsonb
- Language: JavaScript
- Homepage:
- Size: 490 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonb
[![NPM version][npm-img]][npm]
[![Build Status][ci-img]][ci]
[![Coverage Status][coveralls-img]][coveralls]
[npm-img]: https://img.shields.io/npm/v/@tadashi/jsonb.svg
[npm]: https://www.npmjs.com/package/@tadashi/jsonb
[ci-img]: https://github.com/lagden/jsonb/actions/workflows/nodejs.yml/badge.svg
[ci]: https://github.com/lagden/jsonb/actions/workflows/nodejs.yml
[coveralls-img]: https://coveralls.io/repos/github/lagden/jsonb/badge.svg?branch=master
[coveralls]: https://coveralls.io/github/lagden/jsonb?branch=master
-----
Compress or decompress any data
## Install
```
$ npm i -S @tadashi/jsonb
```
## Usage
```js
import {compress, decompress} from '@tadashi/jsonb'
const c = await compress({a: 'foo', b: 'bar'})
// => Cw2AW3siYSI6MSwiYiI6Mn0sImZvbyIsImJhciJdAw==
const d = await decompress(c)
// => {a: 'foo', b: 'bar'}
```
## License
MIT © [Thiago Lagden](https://github.com/lagden)