mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-18 06:09:58 +00:00
9 lines
172 B
JavaScript
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
|
||
|
}
|
||
|
}
|