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=1769&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"(2636ms)

effectorWithPatronummain.tsx1 match

@sergeysova•Updated 1 year ago
2import { effector } from "https://esm.town/v/effector/effector?v=2";
3
4export async function effectorWithPatronum(req: Request) {
5 const { createEvent, createStore, sample } = await effector();
6 const { condition } = await patronum();

myApimain.tsx1 match

@vandyand•Updated 1 year ago
1export function myApi(name) {
2 if (!name) {
3 return "hi you!";

link_of_the_daymain.tsx1 match

@robik•Updated 1 year ago
2import { retrieve_pocket } from "https://esm.town/v/robik/retrieve_pocket";
3
4export async function link_of_the_day() {
5 const rawResponse = await retrieve_pocket({
6 state: "unread",

myApimain.tsx1 match

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

gitlabUserContributionEventsmain.tsx1 match

@rwev•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export async function gitlabUserContributionEvents(afterDateMs) {
5 const after = new Date(afterDateMs).toISOString().split("T")[0];
6 console.log(after);

myApimain.tsx1 match

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

duckAndWafflemain.tsx1 match

@dot•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function duckAndWaffle() {
4 let venue = "duckandwaffle";
5 let start_date = "02-14-2023";

resumeWebsitemain.tsx1 match

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

reactSSRExamplemain.tsx2 matches

@neverstew•Updated 1 year ago
4 const ReactDOMServer = await import("npm:react-dom/server");
5 // Define some components
6 function TodoItem(props) {
7 return React.createElement("li", null, props.text);
8 }
9 function TodoList(props) {
10 const todoItems = props.items.map((item, index) =>
11 React.createElement(TodoItem, { key: index, text: item })

prettifyTSmain.tsx1 match

@pomdtr•Updated 1 year ago
1export async function prettifyTS(code: string) {
2 const prettier = await import(
3 "https://unpkg.com/prettier@3.0.1/standalone.mjs"

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": "*",