Skip to content

Instantly share code, notes, and snippets.

@styk-tv
Last active September 4, 2024 16:46
Show Gist options
  • Select an option

  • Save styk-tv/a3ec64ee3eef039fd77416d22f1988db to your computer and use it in GitHub Desktop.

Select an option

Save styk-tv/a3ec64ee3eef039fd77416d22f1988db to your computer and use it in GitHub Desktop.

Revisions

  1. styk-tv revised this gist Sep 4, 2024. 1 changed file with 21 additions and 1 deletion.
    22 changes: 21 additions & 1 deletion xrstorage.js
    Original file line number Diff line number Diff line change
    @@ -1 +1,21 @@
    console.log ("its alive")
    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");
  2. styk-tv created this gist Sep 4, 2024.
    1 change: 1 addition & 0 deletions xrstorage.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    console.log ("its alive")