diff options
| author | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-18 22:43:02 -0500 |
|---|---|---|
| committer | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-18 22:43:02 -0500 |
| commit | 30cf48cd70f1c52f89362245891be355af110afe (patch) | |
| tree | 5cfee873428a8519c5d117917f3abbb3659b631b /public/gl/io | |
| parent | initial (diff) | |
| download | webgl-30cf48cd70f1c52f89362245891be355af110afe.tar.gz webgl-30cf48cd70f1c52f89362245891be355af110afe.tar.bz2 webgl-30cf48cd70f1c52f89362245891be355af110afe.zip | |
cube
Diffstat (limited to 'public/gl/io')
| -rw-r--r-- | public/gl/io/file.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/public/gl/io/file.js b/public/gl/io/file.js new file mode 100644 index 0000000..f89565c --- /dev/null +++ b/public/gl/io/file.js @@ -0,0 +1,11 @@ +export { readFileAsync } + +const readFileAsync = async (path) => { + try { + let data = await fetch(path) + let text = await data.text() + return text + } catch (err) { + return undefined + } +}
\ No newline at end of file |