loadFromFs: clean up

This commit is contained in:
wukko 2024-05-15 22:28:31 +06:00
parent 98e05368ed
commit c2678888be
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -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
}
}