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/$%7Bart_info.art.src%7D?q=function&page=2135&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 22656 results for "function"(2405ms)

weatherGovGridmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function weatherGovGrid({ lat, lon }): Promise<WeatherData> {
4 return fetchJSON(
5 `https://api.weather.gov/points/${lat},${lon}`,

r2main.tsx1 match

@stevekrouse•Updated 1 year ago
3import { whoami } from "https://esm.town/v/stevekrouse/whoami";
4
5export async function r2(key, value?, keys?) {
6 // GET
7 if (value === undefined) {

runAllTests2main.tsx1 match

@stevekrouse•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function runAllTests2({ names }: { names: string[] }) {
5 return names.map((name) =>
6 fetchJSON(`${TEST_API}/eval/@stevekrouse.${name}()`)

myApimain.tsx1 match

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

hnFollowmain.tsx1 match

@akkartik•Updated 1 year ago
6
7export const hnFollow = async () => {
8 // poll using @stevekrouse's helper function
9 let posts = await hnLatestPosts({
10 authors: hnAuthors,

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

ghIssueFromNodeIdmain.tsx1 match

@augustohp•Updated 1 year ago
1export async function ghIssueFromNodeId(nodeId: string, token: string): Promise<{
2 id: string;
3 number: number;

publishYoutubeToLemmymain.tsx2 matches

@pdebie•Updated 1 year ago
2import { youtubeFeed } from "https://esm.town/v/pdebie/youtubeFeed";
3
4export async function publishYoutubeToLemmy(
5 { instance, communityId, auth, youtubeChannelId, syncInfo, filter }: {
6 instance: string;
14 const { LemmyHttp } = await import("npm:lemmy-js-client@0.18.1");
15 let client = new LemmyHttp(`https://${instance}`, {
16 fetchFunction: fetch,
17 });
18 const items =

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 1 month 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.