mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-12 11:52:12 +01:00
loadFromFs: clean up
This commit is contained in:
parent
98e05368ed
commit
c2678888be
1 changed files with 2 additions and 2 deletions
|
@ -3,14 +3,14 @@ import * as fs from "fs";
|
|||
export function loadJSON(path) {
|
||||
try {
|
||||
return JSON.parse(fs.readFileSync(path, 'utf-8'))
|
||||
} catch(e) {
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
export function loadFile(path) {
|
||||
try {
|
||||
return fs.readFileSync(path, 'utf-8')
|
||||
} catch(e) {
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue