json-ziip
v1.1.1
Published
A package that tranforms a json object into a zipped file.
Downloads
8
Readme
JSON to Zip
A lightweight npm package that converts a JSON object into a zipped file.
This package provides a function JsonZiip
that takes JSON data and an output file name, creates a zip file with the JSON data, and returns a Buffer of the zipped file.
Installation
npm install json-ziip
Usage
import { JsonZiip } from 'json-ziip';
const jsonData = {
key: 'value',
anotherKey: 'another value'
};
const buffer = JsonZiip(jsonData, 'output');
// `buffer` now contains a Buffer of a zipped file containing `jsonData`