28
29 console.log(
30 `average e2e user function time: ${(
31 userFuncTimes.reduce((a, b) => a + b, 0) / count
32 ).toFixed(0)}ms (fastest was ${userFuncTimes
7// until it's down, and store the state in
8// @stevekrouse.twitterAPIDown ({ down: boolean, reason: string})
9export async function checkIfTwitterAPIIsDown() {
10 try {
11 // query for something we know will return results
1export function myApi(name) {
2 return "hi " + name;
3}
3 * (c) 2019 Tom Bremmer (https://tbremer.com/) and Chris Ferdinandi (https://gomakethings.com), MIT License,
4 * @param {Array} arr The array to group items from
5 * @param {String|Function} criteria The criteria to group by
6 * @return {Object} The grouped object
7 */
8export function groupBy<A>(arr: A[], criteria: ((a: A) => string) | string) {
9 return arr.reduce(function (obj, item) {
10 // Check if the criteria is a function to run on the item or a property of it
11 var key = typeof criteria === "function" ? criteria(item) : item[criteria];
12
13 // If the key doesn't exist yet, create it
1export function myApi(name) {
2 return "hi " + name;
3}
2let { nameList } = await import("https://esm.town/v/acmu/nameList");
3
4export async function myApiDelete(name) {
5 if (Array.isArray(nameList)) {
6 nameList = nameList.filter((i) => i !== name);
2
3export const arenaHelpers = (async () => {
4 async function requestUserWithChannels(userId: number, opts: {
5 accessToken?: string;
6 authToken?: string;
29 return await response.json();
30 }
31 const resolveChannels = async function (arenaUserCreds) {
32 console.log("DEBUG", "start resolve channels");
33 try {
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
3
4// Triggered when someone tells us what they want to use VT for
5export async function handleOnboardingUseCases({ auth, handle, useCases }: {
6 auth: string;
7 handle: string;
A helper function to build a file's email
Simple functional CSS library for Val Town
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.