9 lines
No EOL
172 B
JavaScript
9 lines
No EOL
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
|
|
}
|
|
} |