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?q=function&page=2771&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 29320 results for "function"(4964ms)

untitled_crimsonSilkwormmain.tsx1 match

@e_hwun•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

annoymain.tsx1 match

@rcurtiss•Updated 1 year ago
3import { resume as resume2 } from "https://esm.town/v/ajax/resume";
4
5export async function annoy() {
6 const resume = resume2;
7 // const boo = await import("https://esm.sh/@atproto/api");

bsky_rss_pollREADME.md2 matches

@rcurtiss•Updated 1 year ago
4It's split into three parts:
51. [`bsky_rss_poll`](https://val.town/@jordan.bsky_rss_poll)
6 - This function runs every hour and polls the provided RSS feed, turns it into XML and runs the check. If there *is* a new post, it tell `rss_to_bsky`to post a link (and the title) to Bluesky
72. [`latest_rss`](https://val.town/@jordan.latest_rss)
8 - This is a stored object that keeps the latest object for the poll to test against
93. [`rss_to_bsky`](https://val.town/@jordan.rss_to_bsky)
10 - This function turns the text post into a rich text post and posts it to Bluesky

bsky_rss_pollmain.tsx1 match

@rcurtiss•Updated 1 year ago
4import { latest_rss as latest_rss2 } from "https://esm.town/v/jordan/latest_rss";
5
6export async function bsky_rss_poll() {
7 const { parseFeed } = await import("https://deno.land/x/rss/mod.ts");
8 const res = await fetch("https://v8.dev/blog.atom")

untitled_coffeeMartenmain.tsx1 match

@rohansolo156•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

untitled_redCarpmain.tsx1 match

@nnwetzel•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

gronwmain.tsx1 match

@u•Updated 1 year ago
1import { gron } from "https://esm.town/v/u/gron";
2
3export default async function untitled_roseClownfish(req: Request): Promise<Response> {
4 let url: URL;
5 try {

refreshTokenmain.tsx1 match

@petermillspaugh•Updated 1 year ago
6}
7
8export async function refreshToken({ email, token }: RefreshVerificationTokenParams) {
9 const newToken = crypto.randomUUID();
10

sendVerificationmain.tsx1 match

@petermillspaugh•Updated 1 year ago
6}
7
8export async function sendVerification({ emailAddress, html }: VerificationEmailParams) {
9 try {
10 // email a confirmation link to the subscriber

fetchConfirmationHtmlmain.tsx1 match

@petermillspaugh•Updated 1 year ago
5}
6
7export function fetchConfirmationHtml({ email, token, reVerifying }: FetchVerificationEmailHtmlParams) {
8 const confirmationLink = `https://petemillspaugh.com/make-it-stick/email-confirmation?email=${email}&token=${token}`;
9 const html = `
tuna

tuna9 file matches

@jxnblk•Updated 1 day ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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.