12 lines
No EOL
208 B
JavaScript
12 lines
No EOL
208 B
JavaScript
const File = {}
|
|
|
|
File.read = async (path) => {
|
|
try {
|
|
let data = await fetch(path)
|
|
let text = await data.text()
|
|
return text
|
|
} catch (err) {
|
|
return undefined
|
|
}
|
|
|
|
} |