Files

17 lines
320 B
JavaScript
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
function getJsonFile(path) {
var fs = require('fs');
var output = {};
try {
var json = fs.readFileSync(path);
output = JSON.parse(json);
}
catch(e) {
output = {};
// console.log(e.message, e.stack);
}
return output;
}
module.exports = exports = getJsonFile;