const fs = require('fs')
module.exports.parser = path => {
const readStream = fs.createReadStream(path)
let reqData = [];
let buffer
return new Promise(resolve => {
readStream.on("data", function (data) {
reqData.push(data);
});
readStream.on("end", function () {
buffer = Buffer.concat(reqData)
resolve(JSON.parse(buffer.toString()))
})
})
}