CS2613/assignments/A3/read_json_file.js
2022-10-20 23:39:33 -03:00

8 lines
181 B
JavaScript

let fs = require('fs');
function read_json_file(filename) {
let contents = fs.readFileSync(filename);
return JSON.parse(contents);
}
exports.read_json_file=read_json_file;