npm.io
0.1.1 • Published 6 years ago

mgf-generator

Licence
MIT
Version
0.1.1
Deps
0
Size
6 kB
Vulns
0
Weekly
0

mgf-generator

NPM version build status npm download

Generate an MGF out of a JSON file. This package is complementary to mgf-parser.

Installation

$ npm i mgf-generator

Usage

import { readFileSync } from 'fs';
import { join } from 'path';

import generateMGF from 'mgf-generator';

let parsedData = readFileSync(join(__dirname, './data/test.json'), 'utf8');

parsedData = JSON.parse(parsedData);

let result = generateMGF(parsedData);

// result is a string in MGF format

API Documentation

License

MIT