mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-23 04:03:42 -04:00
10 lines
212 B
JavaScript
10 lines
212 B
JavaScript
const fs = require('fs');
|
|
|
|
const openJSONFile = fileName => {
|
|
const data = JSON.parse(fs.readFileSync(fileName, 'utf8'));
|
|
console.log('Opened JSON file')
|
|
return data;
|
|
};
|
|
|
|
module.exports = { openJSONFile };
|