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=1746&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 18321 results for "function"(1863ms)

pingReplitmain.tsx1 match

@dr0•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function pingReplit() {
4 fetch("https://lookup.icxk.top/imgs/36x36.png");
5}

myApimain.tsx1 match

@cescyang•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}
1import { dinoGameScoreboard } from "https://esm.town/v/rodrigotello/dinoGameScoreboard";
2
3export function denoGameCurrentScoreboardLeader() {
4 let currentLeader = dinoGameScoreboard.reduce(
5 (highest, current) => {

myApimain.tsx1 match

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

handleISBNBookmain.tsx1 match

@octref•Updated 1 year ago
3import { ghContent2 } from "https://esm.town/v/octref/ghContent2";
4
5export async function handleISBNBook(req: express.Request, res: express.Response) {
6 const ISBN_PATH = "data/mine/books-isbn.json";
7 const { content, sha } = await ghContent2(ISBN_PATH);

TanaCurrencymain.tsx1 match

@eagle251•Updated 1 year ago
1import { currency } from "https://esm.town/v/stevekrouse/currency?v=23";
2
3export async function TanaCurrency(req, res) {
4 let amount = parseFloat(`${req.query.amount}`);
5 const usdGBP = await currency(

d3ChordDiagrammain.tsx3 matches

@fil•Updated 1 year ago
1import { svgServer } from "https://esm.town/v/fil/svgServer";
2
3export async function d3ChordDiagram(req) {
4 // Import D3 and create a DOM document for server-side-rendering.
5 const d3 = await import("npm:d3");
22 // ======================================================
23 //
24 function chart(data) {
25 const width = 640;
26 const height = width;
100 return svg.node();
101 }
102 function groupTicks(d, step) {
103 const k = (d.endAngle - d.startAngle) / d.value;
104 return d3.range(0, d.value, step).map((value) => {

myApimain.tsx1 match

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

fetchImageAsBase64main.tsx1 match

@liamdanielduffy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchImageAsBase64(url) {
4 const response = await fetch(url);
5 const blob = await response.blob();

parseCalendarEventsTablemain.tsx1 match

@liamdanielduffy•Updated 1 year ago
2 [key: string]: string;
3};
4export async function parseCalendarEventsTable(html: string): Promise<TableRow[]> {
5 const { DOMParser } = await import(
6 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"

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
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.