From b677d3bb3d6c8fbb0b61621cc8ac53a7d68fa949 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 12 Feb 2020 09:04:53 -0300 Subject: wip --- tmp/api-wasm.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tmp/api-wasm.js (limited to 'tmp/api-wasm.js') 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")); -- cgit v1.2.3