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=1765&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 18189 results for "function"(3898ms)

myApimain.tsx1 match

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

schemamain.tsx1 match

@u•Updated 1 year ago
1export function schema(req, res) {
2}

sparklineEx2main.tsx1 match

@stevekrouse•Updated 1 year ago
1import { sparklineSVG } from "https://esm.town/v/stevekrouse/sparklineSVG";
2
3export let sparklineEx2 = function (req, res) {
4 res.set("content-type", "image/svg+xml");
5 res.end(sparklineSVG({

randomizemain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function randomize(a) {
2 return a.sort(() => Math.random() - Math.random());
3}

emailEchomain.tsx1 match

@stevekrouse•Updated 1 year ago
2import { mail } from "https://esm.town/v/stevekrouse/mail";
3
4export const emailEcho = function (email: Email) {
5 return mail({
6 to: email.from,

notifyNewBymain.tsx2 matches

@stevekrouse•Updated 1 year ago
4// Customizable notifications for customizable content for a customizable new criteria
5// Example usage: @stevekrouse.dateMeNotify
6export function notifyNewBy<A>({ getData, isNew, notify, name }: {
7 getData: (d?: Date) => A[] | Promise<A[]>;
8 isNew: (params: {
13 name?: string;
14}) {
15 return async function ({ lastRunAt }: Interval) {
16 const data = await getData(lastRunAt);
17 let newData = data.filter((data) => isNew({ data, lastRunAt }));

myApimain.tsx1 match

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

myApimain.tsx1 match

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

renderTopStoriesmain.tsx1 match

@iakovos•Updated 1 year ago
1import { getUrlHostname } from "https://esm.town/v/iakovos/getUrlHostname";
2
3export function renderTopStories(stories: {
4 id: number;
5 title: string;

questionsWithGuidelinesChainmain.tsx1 match

@jacoblee93•Updated 1 year ago
37 .pipe(new StringOutputParser());
38 // RunnableSequence.from() is equivalent to `.pipe().pipe()`
39 // but will coerce objects (and functions) into runnables
40 const questionStyleChain = RunnableSequence.from([
41 {

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