CS2613/labs/L09/read_json_file.js

8 lines
181 B
JavaScript
Raw Permalink Normal View History

2022-10-12 11:10:43 -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;