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=1728&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 17350 results for "function"(1720ms)

importGistsREADME.md2 matches

@maasUpdated 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

@stevekrouseUpdated 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

@tmcwUpdated 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

createGeneratedValREADME.md1 match

@andreterronUpdated 1 year ago
1# Use GPT to generate vals on your account!
2
3Describe the val that you need, call this function, and you'll get a new val on your workspace generated by OpenAI's API!
4
5First, ensure you have a [Val Town API Token](https://www.val.town/settings/api), then call `@andreterron.createGeneratedVal({...})` like this [example](https://www.val.town/v/andreterron.untitled_tomatoKiwi):

luxonExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# luxon
2
3[Luxon](https://moment.github.io/luxon/#/?id=luxon) is, like [date-fns](https://www.val.town/v/tmcw.datefnsExample), a good option for formatting, parsing, and manipulating dates. It's more of a direct successor to [moment](https://www.val.town/v/tmcw.momentExample) and has a similar method-chain-oriented API rather than function-call oriented API like date-fns.
4
5Migrated from folder: Modules/luxonExample

ramdaExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# ramda
2
3[ramda](https://ramdajs.com/) is a module like [lodash](https://www.val.town/v/tmcw.lodashExample) or [underscore](https://www.val.town/v/tmcw.underscoreExample) but with a much heavier emphasis on functional programming. It lets you do the same kind of things but in a much 🌶️ spicier, 💪 more macho, 🤔 sometimes confusing style. I was really into this module in my late 20s.
4
5Migrated from folder: Modules/ramdaExample

underscoreExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# underscore
2
3[underscore](https://underscorejs.org/) is a module for functional programming and other utilities in JavaScript. It inspired [lodash](https://www.val.town/v/tmcw.lodashExample), which is what most people use now, because lodash is both faster, and provides an ESM version which is convenient to use in Val Town.
4
5Note that while we can import from `lodash-es` and use its named exports, `underscore` only provides a default export, so that's why we have the code `{ default: _ }` below.

lodashExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# lodash
2
3[Lodash](https://lodash.com/) is the most popular npm module. It provides helpers for functional programming, common algorithms, and a lot more. Before JavaScript had built-in methods for [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), lodash (and [underscore](https://underscorejs.org/) before it) provided those methods.
4
5Migrated from folder: Modules/lodashExample

testEmailREADME.md1 match

@stevekrouseUpdated 1 year ago
1# Receive an email to a val
2
3Every function val can be send an email: `username.valname@valtown.email`
4
5This val's email address is: `stevekrouse.testEmail@valtown.email`

hiNicoFromGistsREADME.md1 match

@stevekrouseUpdated 1 year ago
5This example pulls from this gist: [example.js](https://gist.github.com/stevekrouse/c045b716c68790fad5f556e86fd46f3c)
6
7Which has this code: `export const hi = function() { return "Hi Nico!" }`
8
9

getFileEmail4 file matches

@shouserUpdated 1 week ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblkUpdated 1 week 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": "*",