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=1704&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 18165 results for "function"(2496ms)

myApimain.tsx1 match

@jakesing•Updated 1 year ago
1import { myName } from "https://esm.town/v/jakesing/myName";
2
3export function myApi() {
4 return "hi " + myName;
5}

googleSheetsDatemain.tsx1 match

@kognise•Updated 1 year ago
1export function googleSheetsDate(date: Date): number {
2 return date.getTime() / 1000 / 60 / 60 / 24 + 25569
3}
1import { johnnycashtodolistcounter } from "https://esm.town/v/politelyinvinciblepointer/johnnycashtodolistcounter";
2
3export function getjohnnycashtodolistcounter() {
4 return johnnycashtodolistcounter;
5}

congressmain.tsx1 match

@devdoshi•Updated 1 year ago
2import { fetchCongressTradeReports } from "https://esm.town/v/claytn/fetchCongressTradeReports?v=3";
3
4export async function congress() {
5 let text;
6 fetchCongressTradeReports((reports) => text = reports);

getSofZmanShmamain.tsx1 match

@shaya•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getSofZmanShma(city) {
4 console.log({ city });
5 const today = new Date().toISOString().split("T")[0];

myApimain.tsx1 match

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

syncCommentToLemmymain.tsx4 matches

@pdebie•Updated 1 year ago
3import { fetchRss } from "https://esm.town/v/pdebie/fetchRss";
4
5export async function syncCommentToLemmy(
6 instance: string,
7 redditUrl: string,
10 matcher?: (author: string, content: string) => boolean,
11) {
12 function hashCode(str) {
13 let hash = 0;
14 for (let i = 0, len = str.length; i < len; i++) {
21 const { LemmyHttp } = await import("npm:lemmy-js-client@0.18.1");
22 let client = new LemmyHttp(`https://${instance}`, {
23 fetchFunction: fetch,
24 });
25 // (client as any)["#fetchFunction"] = fetch;
26 let comments = (await fetchRss(redditUrl)).filter((i) =>
27 new Date(i.isoDate) >= new Date(Date.now() - 1000 * 60 * 60 * 24)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

fetchHtmlDommain.tsx1 match

@aeaton•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchHtmlDom(url: string) {
4 const { DOMParser } = await import(
5 "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
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": "*",