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/$%7Bsuccess?q=function&page=52&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 19498 results for "function"(2181ms)

resume-parserresumeParser.ts12 matches

@prashamtrivedi•Updated 2 days ago
16
17/**
18 * Helper function to create a confidence field with a value and confidence score
19 */
20function createConfidenceField<T>(
21 value: T,
22 confidence: number,
37 * @returns Structured resume data with confidence scores
38 */
39export async function extractResumeData(
40 resumeText: string,
41 options?: ResumeParserOptions
96 * @returns Finalized resume data
97 */
98function postProcessResumeData(data: any, confidenceThreshold: number = 0.3): ParsedResume {
99 try {
100 // Ensure we have all required sections with at least empty arrays
220 * Create a default personal info object with empty fields
221 */
222function createDefaultPersonalInfo(): PersonalInfo {
223 return {
224 name: createConfidenceField('', 0),
236 * Calculate months between two dates
237 */
238function calculateMonthsBetween(startDate: Date, endDate: Date): number {
239 return (endDate.getFullYear() - startDate.getFullYear()) * 12 +
240 (endDate.getMonth() - startDate.getMonth());
247 * @returns Validated and standardized resume data
248 */
249export function validateAndStandardize(data: ParsedResume): ParsedResume {
250 // This function is now deprecated in favor of the validateResumeWithAI function
251 // which uses OpenAI to validate and standardize the data
252 return data;
261 * @returns Confidence score between 0 and 1
262 */
263export function calculateConfidence(
264 value: any,
265 fieldType: string,
285 * @returns Standardized value and standardization notes
286 */
287export function standardizeTerminology(
288 value: string,
289 fieldType: 'degree' | 'jobTitle' | 'skill' | 'language' | string
302 * @returns Resume data with confidence scores added
303 */
304export function addConfidenceScores(data: any): ParsedResume {
305 // This function would iterate through the resume data and add
306 // confidence scores to each field based on various factors
307

MaxCareVizindex.html1 match

@kvey•Updated 2 days ago
941 let keepPoint, removePoint;
942
943 // Define helper functions to check point types
944 const isCode = (point) => point.codeType === 'cpt' || point.codeType === 'icd10';
945 const isReasoning = (point) => point.codeType === 'step';

sqlite-storage-sizemain.tsx1 match

@stevekrouse•Updated 2 days ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3async function getStorageSize() {
4 const bytes =
5 (await sqlite.execute(`SELECT page_size * page_count FROM pragma_page_size(), pragma_page_count()`)).rows[0][0];

untitled-7266new-file-6774.tsx1 match

@stevekrouse•Updated 2 days ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3async function getStorageSize() {
4 const bytes =
5 (await sqlite.execute(`SELECT page_size * page_count FROM pragma_page_size(), pragma_page_count()`)).rows[0][0];

sqliteAdminDashboardmain.tsx4 matches

@zylanera•Updated 2 days ago
1// This val creates a SQLite dashboard admin panel with a sidebar for table names
2// It uses React for the frontend and the Val Town SQLite API for database operations
3// Now includes functionality to edit rows, using rowid or all columns as identifiers
4// and the ability to add new rows to tables
5// Column types are displayed next to column names in the UI
10import { vtTokenSessionAuth } from "https://esm.town/v/stevekrouse/vtTokenSessionAuthSafe";
11
12function App() {
13 const [tables, setTables] = useState([]);
14 const [selectedTable, setSelectedTable] = useState(null);
195}
196
197function client() {
198 createRoot(document.getElementById("root")).render(<App />);
199}
203}
204
205async function server(request: Request): Promise<Response> {
206 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
207 const url = new URL(request.url);

templateTwitterAlertREADME.md2 matches

@poarox•Updated 2 days ago
46- Key: `mentionsDiscord`
47- Value: Your Discord webhook URL.
48Notifications will be sent using this function:
49
50```ts
63
64- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.

templateTwitterAlertmain.tsx1 match

@poarox•Updated 2 days ago
12const isProd = false;
13
14export async function twitterAlert({ lastRunAt }: Interval) {
15 // If isProd, search for tweets since that last time this interval ran
16 // if not, search for tweets since 48 hours ago for testing

Boluwatife_Olubodunmain.tsx1 match

@watifedebby•Updated 3 days ago
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {
5 return new Response(
6 renderToString(

linkInBioTemplatemain.tsx1 match

@watifedebby•Updated 3 days ago
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {
5 return new Response(
6 renderToString(

blob_adminapp.tsx7 matches

@robsalasco•Updated 3 days ago
10}
11
12function Tooltip({ children, content }: TooltipProps) {
13 const [isVisible, setIsVisible] = useState(false);
14 const tooltipRef = useRef<HTMLDivElement>(null);
49}
50
51function formatBytes(bytes: number, decimals = 2) {
52 if (bytes === 0) return "0 Bytes";
53 const k = 1024;
58}
59
60function copyToClipboard(text: string) {
61 navigator.clipboard.writeText(text).then(() => {
62 console.log("Text copied to clipboard");
66}
67
68function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
69 const [isOpen, setIsOpen] = useState(false);
70 const menuRef = useRef(null);
73
74 useEffect(() => {
75 function handleClickOutside(event) {
76 if (menuRef.current && !menuRef.current.contains(event.target)) {
77 event.stopPropagation();
155}
156
157function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
158 const [isLoading, setIsLoading] = useState(false);
159 const decodedKey = decodeURIComponent(blob.key);
216}
217
218function App({ initialEmail, initialProfile, sourceURL }) {
219 const encodeKey = (key: string) => encodeURIComponent(key);
220 const decodeKey = (key: string) => decodeURIComponent(key);

getFileEmail4 file matches

@shouser•Updated 3 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 3 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.