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=1363&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 18363 results for "function"(2017ms)

val_l2VXZwPEB5main.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() {
6 let a = 0, b = 1;
7 while (b < 1000) {

val_9TUgqVP5PQmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

val_7zpl8w4v8dmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function findLowestThreeDigitFibonacci() {
6 let a = 0, b = 1;
7 let lowestThreeDigitFibonacci = 0;

val_jkgkaOKFzCmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

val_7APnHlLC0nmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() {
6 let a = 0, b = 1;
7 while (b < 1000) {

val_nOpADZhOkNmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() {
6 let a = 0, b = 1;
7 let lowestThreeDigit = null;

val_wjytJA6GCSmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

val_FTRpMzznMJmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() {
6 let a = 0, b = 1;
7 let lowestThreeDigit;

val_iHF6nZHjLMmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function findLowestThreeDigitFibonacci() {
6 let fib = [0, 1];
7 let nextFib = 1;

val_X6JYYp11Hgmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

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
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.