1export async function getLemmyJwt({ instance, username, password }: {
2 instance: string;
3 username: string;
7 const { LemmyHttp } = await import("npm:lemmy-js-client@0.18.1");
8 let client = new LemmyHttp(`https://${instance}`, {
9 fetchFunction: fetch,
10 });
11 try {
1export function myApi(name) {
2 return "hi " + name;
3}
1export function markovChoice(candidates: Record<string, number>) {
2 const totalWeight = Object.values(candidates).reduce((a, b) => a + b);
3 let result = null;
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function formatAsCurrency(num) {
2 let formatter = new Intl.NumberFormat("en-US", {
3 style: "currency",
1export function myApi(name) {
2 console.email("name sent" + name);
3}
6 ARE JSON.stringify-ied SO RETURNED CLOSURES AREN'T SUPPORTED
7
8 USE THE INDIVIDUAL FUNCTIONS INSTEAD:
9 @claytn.replitGet
10 @claytn.replitSet
15/** Database client for replit's key-value store */
16
17export function createReplitDBClient(REPLIT_DB_URL) {
18 return {
19 get: (key) => {
4 );
5 const html = htm.bind(h);
6 function Component() {
7 const [count, setCount] = useState(0);
8 return html`<div class="foo">${count}</div>`;
Simple functional CSS library for Val Town
A helper function to build a file's email
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.