mirror of
https://github.com/wukko/cobalt.git
synced 2024-09-07 12:09:09 +01: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
|
||
|
}
|
||
|
}
|