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=1785&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 19439 results for "function"(2044ms)

crux_addmain.tsx1 match

@yieldray•Updated 1 year ago
1export async function crux_add(name: string, content: string) {
2 const res = await fetch("https://crux.land/api/add", {
3 method: "POST",

checkIosBingAppsmain.tsx1 match

@cescyang_service•Updated 1 year ago
3import { fetch } from "https://esm.town/v/std/fetch";
4
5export async function checkAndroidBingApps() {
6 const { default: axios } = await import("npm:axios");
7 const url =

checkAndroidBingAppsmain.tsx1 match

@cescyang_service•Updated 1 year ago
3import { fetch } from "https://esm.town/v/std/fetch";
4
5export async function checkAndroidBingApps() {
6 const { default: axios } = await import("npm:axios");
7 const url =

untitled_emeraldChinchillamain.tsx2 matches

@tejchak•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",
19});
20
21export function forwarder(e: {
22 from: "tejchak04@gmail.com";
23 to: "chakravarthy.t@northeastern.edu";

getReplicatePredictionmain.tsx1 match

@patrickjm•Updated 1 year ago
5 https://replicate.com/docs/reference/http#get-prediction
6*/
7export async function getReplicatePrediction({
8 /** https://replicate.com/account */
9 apiKey,

untitled_silverFowlmain.tsx1 match

@rmahshie50•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",

subarumain.tsx5 matches

@seep•Updated 1 year ago
8type ServiceResponse = { id: string; success: boolean };
9
10export async function login() {
11 const body = new URLSearchParams({
12 "username": process.env.SUBARU_USERNAME,
22}
23
24export async function status(id: string): Promise<ServiceResponse> {
25 const body = new URLSearchParams({
26 serviceRequestId: id,
33}
34
35export async function start(overrides?: Record<string, string>): Promise<ServiceResponse> {
36 const opts = Object.assign({
37 "now": `${Date.now()}`,
63}
64
65export async function stop(overrides?: Record<string, string>): Promise<ServiceResponse> {
66 const opts = Object.assign({
67 "now": `${Date.now()}`,
78}
79
80async function parseServiceResponse(res: Response): Promise<ServiceResponse> {
81 assert(res.status == 200, `unexpected service response status: ${res.status}`);
82

untitled_lavenderWildfowlmain.tsx1 match

@aounw•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",

sunbeammain.tsx1 match

@pomdtr•Updated 1 year ago
10`;
11
12export default function(req: Request) {
13 const [, author, name] = new URL(req.url).pathname.split("/");
14 if (!author || !name) {

untitled_scarletGoldfishmain.tsx1 match

@griffinolson•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",

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.