cobalt/modules/sub/load-json.js

9 lines
172 B
JavaScript
Raw Normal View History

2022-07-08 19:17:56 +01:00
import * as fs from "fs";
export default function(path) {
try {
return JSON.parse(fs.readFileSync(path, 'utf-8'))
} catch(e) {
return false
}
}