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=1809&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"(3902ms)

devNullREADME.md3 matches

@stevekrouse•Updated 1 year ago
1# Dev Null
2
3A JS function and API inspired by `/dev/null` that will throw away whatever you send it and return `null`.
4
5## Function usage
6
7```
15## Why?
16
17Honestly I don't know why you'd use this function. I just made it as a joke to link to it from [@stevekrouse.dm](https://www.val.town/v/stevekrouse.dm). I guess you could also use it a joke to send data you want to call attention to the fact that you very much don't care about it, ie I **really** don't care about the price of bitcoin:
18
19```

dmREADME.md3 matches

@stevekrouse•Updated 1 year ago
11## Protocol
12
13Expose a `dm` function on your namespace that that accepts messages and some authentication data (described below). The easiest way to accomplish this is to fork this val.
14
15What you choose to do with direct messages is totally up to you. At the moment, I email myself your message and save it to a private array val. You could forward it along to yourself some other way, batch up messages to get a daily summary email if you're Mr. Popular, or send them to [/dev/null](https://www.val.town/v/stevekrouse.devNull) if you're Mr. Antisocial.
17## Authentication
18
19This protocol uses [my Val Town public key auth scheme](https://blog.val.town/public-key-auth-val-town-users-can-be-your-users), so you'll need to follow the first two steps of that blog post – (1) generate a keypair and (2) publish your public key – to authenticate to this function.
20
21## Usage
22
23You can call this function via the [@stevekrouse.runValAPIAuth](/v/stevekrouse.runValAPIAuth) helper:
24
25```js

telegramREADME.md1 match

@pomdtr•Updated 1 year ago
25### 4. Fork this val & run it
26
27Save your own private version of a `telegram` function to your account by forking this val: https://www.val.town/v/pomdtr.telegram
28
29### 5. Send a test message!

chatSampleFunctionTaggingREADME.md1 match

@webup•Updated 1 year ago
1Migrated from folder: openai/samples/functions/chatSampleFunctionTagging

chatSampleFunctionExtractionREADME.md1 match

@webup•Updated 1 year ago
1Migrated from folder: openai/samples/functions/chatSampleFunctionExtraction

chatSampleFunctionMultipleREADME.md1 match

@webup•Updated 1 year ago
1Migrated from folder: openai/samples/functions/chatSampleFunctionMultiple

schemasWeatherREADME.md1 match

@webup•Updated 1 year ago
1Migrated from folder: openai/samples/functions/schemasWeather

chatSampleFunctionSingleREADME.md1 match

@webup•Updated 1 year ago
1Migrated from folder: openai/samples/functions/chatSampleFunctionSingle

thisExpressURLREADME.md1 match

@stevekrouse•Updated 1 year ago
6
7```js
8function testThisExpressUrl(req, res) {
9 let url = @stevekrouse.thisExpressURL();
10 res.send(`<a href="${url}">${url}</a>`);

publishYoutubeToLemmyREADME.md1 match

@pdebie•Updated 1 year ago
6
7```typescript
8async function publishMyFeed() {
9 try {
10 return @pdebie.publishYoutubeToLemmy({

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