Public
Back
Version 5
4/1/2024
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=26";
import { blobStore } from "https://esm.town/v/vladimyr/keyvhqBlob";
import Keyv from "npm:@keyvhq/core";
const { slug } = extractValInfo(import.meta.url);
const keyv = new Keyv({ store: blobStore, namespace: slug });
await keyv.set("example", "hello keyv!");
console.log(await keyv.has("thisKeyDoesNotExist"));
console.log(await keyv.has("example"));
console.log(await keyv.get("example"));
{
const { blob } = await import("https://esm.town/v/std/blob?v=11");
const result = await blob.getJSON("keyv");
console.log(result);
}
Updated: April 1, 2024