JSFiddle - React, Tailwind, and code Playground

by johnsonjo4531

JavaScript 1.7

import { storage, StorageArea } from "std:kv-storage";
console.log(storage)
(async () => {
  await storage.set("mycat", "Tom");
  console.assert(await storage.get("mycat") === "Tom");

  const otherStorage = new StorageArea("unique string");
  console.assert(await otherStorage.get("mycat") === undefined);
  await otherStorage.set("mycat", "Jerry");
  console.assert(await otherStorage.get("mycat") === "Jerry");
})();