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=1939&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 20491 results for "function"(1354ms)

valVersionmain.tsx1 match

@neverstew•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export function valVersion({ token, id, version }: {
4 token?: string;
5 id: string;

hnFollowPollJobmain.tsx1 match

@ritz•Updated 1 year ago
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
4
5export async function hnFollowPollJob({ lastRunAt }) {
6 let posts = await hnLatestPosts({
7 authors: hackerNewsAuthors,

nasaImagemain.tsx1 match

@wallek•Updated 1 year ago
2
3// View at https://wallek-nasaImage.web.val.run
4export async function nasaImage() {
5 const { html } = await nasaImageDetails();
6 return new Response(html, {

parseHtmlmain.tsx1 match

@johndaly•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function parseHtml(url: string) {
4 const { DOMParser } = await import(
5 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"

discogsmain.tsx1 match

@axelav•Updated 1 year ago
2import process from "node:process";
3
4export async function discogs(
5 request: express.Request,
6 response: express.Response

parseMenuLinemain.tsx1 match

@tal•Updated 1 year ago
2import { parseMenuDate } from "https://esm.town/v/tal/parseMenuDate";
3
4export async function parseMenuLine(line: string) {
5 let firstBreakAt = line.indexOf(",");
6 const dateStr = line.substring(0, firstBreakAt);

hnFollowPollJobmain.tsx1 match

@stiha•Updated 1 year ago
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
4
5export async function hnFollowPollJob({ lastRunAt }) {
6 let posts = await hnLatestPosts({
7 authors: hackerNewsAuthors,

untitled_ivoryPiranhamain.tsx1 match

@zemariagp•Updated 1 year ago
1export default function nanoErgun(req, res) {
2 res.send("hi im nano ergun")
3}

firehoseReadMessagesExamplemain.tsx1 match

@healeycodes•Updated 1 year ago
164 socket.addEventListener("message", (event) => {
165 const reader = new FileReader();
166 reader.onload = function () {
167 const arrayBuffer = reader.result;
168 const uint8Array = new Uint8Array(arrayBuffer);

interactiveBrokersMarginsmain.tsx3 matches

@simone•Updated 1 year ago
3let { interactiveBrokersMarginsState } = await import("https://esm.town/v/simone/interactiveBrokersMarginsState");
4
5export async function interactiveBrokersMargins() {
6 function zip(...arrays) {
7 const result = [];
8 for (let i = 0; i < arrays[0].length; i++) {
11 return result;
12 }
13 async function loadInteractiveBrokersData() {
14 const cheerio = await import("npm:cheerio");
15 const response = await fetch(

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.