flexi-data-converter
v1.0.1
Published
tiny wrapper to convert files to JSON
Downloads
46
Readme
flexi-data-converter
Author : Mohammed Amir Ansari
This is a wrapper created to convert file data based on the input params.
Installation
npm i flexi-data-converter
Requirements
To convert file data into JSON and/or other formats.
Description
library exposes a function ->
getJson() :
- Input Params:
- filePath: Valid file path of the file to be converted - required
- extension: file extension - required
- sheet: Passed in case of xlsx files to read a specific sheet - optional
- Output:
- [{}] i.e Array of JSON objects
Code Example
const converter = require('flexi-data-converter');
let json = await converter.getJson(__dirname + '/test.xlsx', 'xlsx');
Unit Tests
Run command : npm test
Contributors
Mohammed Amir Ansari
License
MIT License