CS2613/assignments/A3/read_json_file.js

8 lines
181 B
JavaScript
Raw Normal View History

2022-10-20 23:39:33 -03:00
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;