aboutsummaryrefslogtreecommitdiff
path: root/tmp/api-wasm.js
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-02-12 09:04:53 -0300
committerEuAndreh <eu@euandre.org>2020-02-12 09:04:53 -0300
commitb677d3bb3d6c8fbb0b61621cc8ac53a7d68fa949 (patch)
treea3d61cd41fbbc1fa1196f6e4bdcb76c549a3f532 /tmp/api-wasm.js
parentSort pastebins listing by date (diff)
downloadeuandre.org-b677d3bb3d6c8fbb0b61621cc8ac53a7d68fa949.tar.gz
euandre.org-b677d3bb3d6c8fbb0b61621cc8ac53a7d68fa949.tar.xz
wip
Diffstat (limited to 'tmp/api-wasm.js')
-rw-r--r--tmp/api-wasm.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/tmp/api-wasm.js b/tmp/api-wasm.js
new file mode 100644
index 0000000..50e1392
--- /dev/null
+++ b/tmp/api-wasm.js
@@ -0,0 +1,7 @@
+/* WASM implementation of "api.h" interface to be used in web contexts */
+
+export const platformDependentPersistInt = (n) =>
+ localStorage.setItem("persisted", n.toString());
+
+export const platformDependentRetrieveInt = () =>
+ parseInt(localStorage.getItem("persisted"));