Files
Testing/videocall/demos/node_scripts/getJsonFile.js
sean 343b4a3f3f
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-19 18:32:17 -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;