Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/image-url.jpg%20%22Optional%20title%22?q=function&page=1791&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=function

Returns an array of strings in format "username" or "username/projectName"

Found 19319 results for "function"(2531ms)

webHTMLExamplemain.tsx1 match

@maxjoygit•Updated 1 year ago
1// View at https://neverstew-webHTMLExample.web.val.run?name=Steve
2export async function webHTMLExample(req: Request) {
3 const query = new URL(req.url).searchParams;
4 return new Response(

getDetailsPlaystoreREADME.md1 match

@ayrtonlacerda•Updated 1 year ago
1Function that fetches app data from the playstore through bundleId
2
3Migrated from folder: Edoo/getDetailsPlaystore

feedmain.tsx1 match

@darcy•Updated 1 year ago
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export function feed() {
5 let _feed = following.map(async (name) => {
6 let req = await fetch(`https://api.val.town/v1/run/${name}.posts`);

pushToArchivemain.tsx1 match

@fgeierst•Updated 1 year ago
3import { isGermanBusinessHours } from "https://esm.town/v/fgeierst/isGermanBusinessHours";
4
5export async function pushToArchive() {
6 if (isGermanBusinessHours()) {
7 const organizationUnitIds = await getMunichSwimCapacit();

emojiSearchBotmain.tsx1 match

@stevekrouse•Updated 1 year ago
8const openai = new OpenAI({ apiKey: process.env.openai });
9
10export async function emojiSearchBot({ lastRunAt }: Interval) {
11 const token = await refreshEmojiSearchToken();
12 let query = `?start_time=${

refreshTwitterTokenmain.tsx1 match

@andreterron•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function refreshTwitterToken(
5 { refresh_token, client_id, client_secret }: {
6 refresh_token: string;

shitIsMySiteDownmain.tsx1 match

@dougwithseismic•Updated 1 year ago
21 const body = `As of ${timestamp} (${TIMEZONE}), ${URL} is down. Reason: ${error.message}.`;
22
23 // Send email using the updated email function.
24 await email({
25 subject: subject,

twitterRequestAccessTokenmain.tsx1 match

@andreterron•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function twitterRequestAccessToken(
5 { code, redirect_uri, challenge, client_id, client_secret }: {
6 code: string;

gpt4vDemomain.tsx1 match

@stevekrouse•Updated 1 year ago
4const openai = new OpenAI({ apiKey: process.env.openai });
5
6async function main() {
7 const response = await openai.chat.completions.create({
8 model: "gpt-4-vision-preview",

htmlmain.tsx1 match

@hussseinkizz•Updated 1 year ago
1export function html(strings, ...values) {
2 let result = '';
3 strings.forEach((string, i) => {

getFileEmail4 file matches

@shouser•Updated 3 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 3 weeks ago
Simple functional CSS library for Val Town
lost1991
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": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.