Files
freeCodeCamp/sweeper/utils/open-json-file.js
2018-12-05 11:23:55 +05:30

9 lines
178 B
JavaScript

const fs = require('fs');
const openJSONFile = fileName => {
const data = JSON.parse(fs.readFileSync(fileName, 'utf8'));
return data;
};
module.exports = { openJSONFile };