Last active
September 4, 2024 16:46
-
-
Save styk-tv/a3ec64ee3eef039fd77416d22f1988db to your computer and use it in GitHub Desktop.
xrstorage.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const xrstorage = { | |
storage: {}, | |
save: function(key, value) { | |
this.storage[key] = value; | |
console.log(`Saved: ${key} = ${value}`); | |
}, | |
load: function(key) { | |
const value = this.storage[key]; | |
console.log(`Loaded: ${key} = ${value}`); | |
return value; | |
}, | |
loadAll: function() { | |
console.log("Loading all data:", this.storage); | |
return this.storage; | |
} | |
}; | |
console.log("xrstorage is loaded and ready to use"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment