moved to new repo
This commit is contained in:
9
modules/sub/load-json.js
Normal file
9
modules/sub/load-json.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import * as fs from "fs";
|
||||
|
||||
export default function(path) {
|
||||
try {
|
||||
return JSON.parse(fs.readFileSync(path, 'utf-8'))
|
||||
} catch(e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user