Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.05 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.05 KB

mgf-parser

NPM version build status npm download

Parse an MGF file into a JSON.

Installation

$ npm i mgf-parser

Usage

parse(rawData[, options])

Parses the text input rawdata into a JSON.

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

import parse from 'mgf-parser';

let rawData = readFileSync(
  join(__dirname, './data.mgf'),
  'utf8',
);

let result = parse(rawData);

// result is the parsed data (array of objects)

License

MIT