From 30cf48cd70f1c52f89362245891be355af110afe Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Wed, 18 Jan 2023 22:43:02 -0500 Subject: cube --- public/gl/io/file.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 public/gl/io/file.js (limited to 'public/gl/io') 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 -- cgit v1.2.3-freya