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/?q=function&page=1796&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 18081 results for "function"(1962ms)

myApimain.tsx1 match

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

REACT_CDN_VALmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
1import { REACT_MINIFIED } from "https://esm.town/v/liamdanielduffy/REACT_MINIFIED";
2
3export function REACT_CDN_VAL(req, res) {
4 res.set("Content-Type", "text/javascript");
5 res.send(REACT_MINIFIED);

pingmain.tsx1 match

@xyh•Updated 1 year ago
1export function ping() {
2 return "pong";
3}

myApimain.tsx1 match

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

stockPriceVizmain.tsx2 matches

@joemccourt•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export async function stockPriceViz(req: Request) {
5 const durations = new Set([1, 5, 15, 30, 60]);
6 const params = new URL(req.url).searchParams;
8 const d = params.get("d");
9 const resData = await fetchJSON(
10 `https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=${symbol}&interval=${d}min&apikey=${process.env.alphaVantage}`,
11 );
12 const data = {

myApimain.tsx1 match

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

emailMeWhenBadAirQualitymain.tsx1 match

@logan•Updated 1 year ago
4import process from "node:process";
5
6export async function emailMeWhenBadAirQuality({ lat, long }: {
7 lat: number;
8 long: number;

getPocketmain.tsx1 match

@jessmartin•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export function getPocket(params) {
4 return fetchJSON("https://getpocket.com/v3/get", {
5 method: "POST",

examplePreactWebAppmain.tsx1 match

@easrng•Updated 1 year ago
2
3export const examplePreactWebApp = preactWebApp(
4 function App(
5 { html, req, ...rest }: typeof preactWebApp.props,
6 ) {

myApimain.tsx1 match

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

getFileEmail4 file matches

@shouser•Updated 1 week 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": "*",