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=1807&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 18147 results for "function"(3742ms)

computeScheduleREADME.md1 match

@xkonti•Updated 1 year ago
1# `computeSchedule` function
2Combines several schedule segments together to form a complete schedule for a 24-hour period.
3

computeScheduleSegmentREADME.md1 match

@xkonti•Updated 1 year ago
1# `computeScheduleSegment` function
2Calculates the on/off time spans for a given schedule segment based on the duty cycle.
3

timeSpanUnionREADME.md1 match

@xkonti•Updated 1 year ago
1# `timeSpanUnion` function
2Combines overlapping time spans into single time spans.
3

isInTimeSpanREADME.md1 match

@xkonti•Updated 1 year ago
1# 'isInTimeSpan` function
2Checks if provided time is within the timeframe of the provided time span.
3

forwarderREADME.md1 match

@maas•Updated 1 year ago
8
90. [Log in to Val Town](val.town/auth/signin)
101. [Fork this Val](https://www.val.town/new?code=function+forwardEmail%28e%3A+%7B%0A++from%3A+string%3B%0A++to%3A+string%5B%5D%3B%0A++subject%3A+string%3B%0A++text%3A+string%3B%0A++html%3A+string%3B%0A%7D%29+%7B%0A++console.email%28%7B+html%3A+e.html%2C+subject%3A+e.subject+%7D%29%3B%0A%7D%0A%2F%2F+Forked+from+%40maas.forwardEmail)
111. Publish the Val via **🔒 > Unlisted**
121. Copy the email endpoint via **â‹® > Endpoints > Copy email address**

getValREADME.md1 match

@neverstew•Updated 1 year ago
2Gets information about a specific val.
3
4To access private vals, pass your API token as a secret to the function. Read more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token and save it as a secret.
5
6Migrated from folder: docs/api/getVal

queryREADME.md1 match

@neverstew•Updated 1 year ago
3Query anything with SQL! Your data is stored in the `data` table.
4
5See the [DuckDB documentation](https://duckdb.org/docs/sql/introduction) for possible functions etc.
6
7Migrated from folder: duckdb/query

importGistsREADME.md2 matches

@maas•Updated 1 year ago
9## Authentication
10
11This function requires two keys: one from Github to get your gists, and one from Val Town to make the vals in your account:
12
131. Github token: https://github.com/settings/tokens
16## Usage
17
18You can use this function by calling it and passing your keys like so:
19
20```

importGistsREADME.md2 matches

@stevekrouse•Updated 1 year ago
7## Authentication
8
9This function requires two keys: one from Github to get your gists, and one from Val Town to make the vals in your account:
10
111. Github token: https://github.com/settings/tokens
14## Usage
15
16You can use this function by calling it and passing your keys like so:
17
18```

pekoExampleREADME.md1 match

@tmcw•Updated 1 year ago
3This is an example of using the tiny [peko](https://peko.deno.dev/) example with Val Town - it's a small router that lets you build web apps using the standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) & [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) objects.
4
5Peko just provides routing - matching URLs with functions - and lets you create your own Response object.
6
7### Server examples

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