October 24, 2023
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import process from "node:process";
import Pantry from "npm:pantry-sdk";
export async function kv(key?: string, val?: any) {
const basket = new Pantry(process.env.$pantry).useBasket(
"val.town",
);
if (!key) {
return await basket.get();
}
if (val) {
return await basket.update({ [key]: val });
}
else {
return (await basket.get())[key];
}
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 24, 2023