cobalt/modules/sub/load-json.js
2022-07-09 00:17:56 +06:00

9 lines
172 B
JavaScript

import * as fs from "fs";
export default function(path) {
try {
return JSON.parse(fs.readFileSync(path, 'utf-8'))
} catch(e) {
return false
}
}