Files
Testing/videocall/demos/node_scripts/getJsonFile.js
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

17 lines
320 B
JavaScript

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;