11 lines
No EOL
222 B
JavaScript
11 lines
No EOL
222 B
JavaScript
export { readFileAsync }
|
|
|
|
const readFileAsync = async (path) => {
|
|
try {
|
|
let data = await fetch(path)
|
|
let text = await data.text()
|
|
return text
|
|
} catch (err) {
|
|
return undefined
|
|
}
|
|
} |