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=1830&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 18856 results for "function"(1222ms)

myApimain.tsx1 match

@emilsall•Updated 1 year ago
1export function myApi(name) {
2 return "hiyyyy " + name;
3}

getCoolPostsmain.tsx1 match

@VictorForissier•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function getCoolPosts() {
4 return fetch("https://hn.algolia.com/api/v1/search_by_date?tags=author_pg")
5 .then((res) => res.json())

expressHTMLExamplemain.tsx1 match

@dpetrouk•Updated 1 year ago
1// View at https://stevekrouse-expressHTMLExample.express.val.run?name=Steve
2export async function expressHTMLExample(
3 req: express.Request,
4 res: express.Response,

hellomain.tsx1 match

@raulreclique•Updated 1 year ago
1export function hello(app) {
2 return "Apple Sauce";
3}

chorus_get_all_datamain.tsx1 match

@hyperglitch•Updated 1 year ago
3import process from "node:process";
4
5export async function chorus_get_all_data(auth, cached) {
6 // check auth
7 if (auth != process.env.chorus_access) {

fetchermain.tsx1 match

@u•Updated 1 year ago
1export async function fetcher() {}

nearbyJonBomain.tsx1 match

@jonbo•Updated 1 year ago
43${
44 raw(`
45 function fetchTest() {
46 console.log("hi");
47

SignatureCheckmain.tsx1 match

@karfau•Updated 1 year ago
1export function SignatureCheck(
2 onInvalid: (reason: string) => void = console.error,
3) {

testmain.tsx1 match

@abc3354•Updated 1 year ago
1export const test = function () {
2 console.info("Hello world");
3};

myApimain.tsx1 match

@sharetru•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

getFileEmail4 file matches

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

tuna8 file matches

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