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=1604&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 19020 results for "function"(2049ms)

sqliteExplorerAppREADME.md1 match

@rchasman•Updated 10 months ago
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query

dateme_layoutmain.tsx1 match

@vawogbemi•Updated 10 months ago
4const tabs = { "/": "Home", "/browse": "Browse", "/faq": "FAQ" };
5
6export default function({ activeTab, children }: PropsWithChildren<{ activeTab: string }>) {
7 return (
8 <html>

processTextInChunksREADME.md4 matches

@yawnxyz•Updated 10 months ago
1# Text Chunk Processor
2
3This JavaScript function processes long text inputs by breaking them into smaller chunks, applying a custom processing function to each chunk, and optionally handling overlaps between chunks.
4
5## Function Signature
6
7```javascript
12
13- `inputText` (string): The long input text to be processed.
14- `processFn` (function, optional): A function to process each chunk. Defaults to logging the chunk.
15- `config` (object, optional): Configuration options.
16
44## Notes
45
46- If `processFn` is not provided, the function will log each chunk and return the original text.
47- If `processFn` returns a value, these values will be collected in an array and returned.
48- If `processFn` doesn't return anything, the original input text is returned.

cyanGuppymain.tsx1 match

@niek•Updated 10 months ago
125});
126
127async function getToken(c) {
128 const state = c.req.query("state") as string;
129 const authData = await db.select().from(table).where(eq(table.id, state)).limit(1);

yellowSpidermain.tsx1 match

@stevekrouse•Updated 10 months ago
1import { jsPython } from "npm:jspython-interpreter";
2const interpreter = jsPython()
3 .addFunction("fetch", fetch);
4const script = `
5 print(fetch("https://datasette.simonwillison.net/simonwillisonblog/blog_quotation.json?_labels=on&_shape=objects").text())

dateme_browsemain.tsx4 matches

@vawogbemi•Updated 10 months ago
5import { zip } from "npm:lodash-es";
6
7function absoluteURL(url) {
8 if (url.startsWith("http://") || url.startsWith("https://"))
9 return url;
24let linkClass = "text-sky-600 hover:text-sky-500";
25
26function httpsIfy(url: string) {
27 if (!url.startsWith("http://") && !url.startsWith("https://")) {
28 return `https://${url}`;
31}
32
33function renderCell(header, row) {
34 let data = row[header];
35 if (header === "Name") {
49}
50
51export default async function Browse(c) {
52 const url = new URL(c.req.url);
53 const search = {

sqliteExplorerAppREADME.md1 match

@vawogbemi•Updated 10 months ago
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query

dailyStandupBotmain.tsx1 match

@kevinw•Updated 10 months ago
1import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
2
3export default async function() {
4 discordWebhook({
5 url: Deno.env.get("engDiscord"),

readwiseHighlightsmain.tsx1 match

@zerovox•Updated 10 months ago
1export async function readwiseHighlights(token: string, ids?: number[]) {
2 let fullData = [];
3 let nextPageCursor = null;

readwiseReaderDocumentListmain.tsx1 match

@zerovox•Updated 10 months ago
24}
25
26export async function readwiseReaderDocumentList(
27 token: string,
28 updatedAfter: string | undefined,

getFileEmail4 file matches

@shouser•Updated 2 weeks 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
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.