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=777&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 7802 results for "function"(463ms)

parseXMLmain.tsx1 match

@stevekrouseUpdated 1 year ago
1export async function parseXML(xml) {
2 const { XMLParser } = await import("https://esm.sh/fast-xml-parser@4.1.2");
3 const parser = new XMLParser();

testMutateSemanticsmain.tsx1 match

@stevekrouseUpdated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function testMutateSemantics({
5 stateName,
6 api,

pekoExampleREADME.md1 match

@tmcwUpdated 1 year ago
3This is an example of using the tiny [peko](https://peko.deno.dev/) example with Val Town - it's a small router that lets you build web apps using the standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) & [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) objects.
4
5Peko just provides routing - matching URLs with functions - and lets you create your own Response object.
6
7### Server examples

luxonExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# luxon
2
3[Luxon](https://moment.github.io/luxon/#/?id=luxon) is, like [date-fns](https://www.val.town/v/tmcw.datefnsExample), a good option for formatting, parsing, and manipulating dates. It's more of a direct successor to [moment](https://www.val.town/v/tmcw.momentExample) and has a similar method-chain-oriented API rather than function-call oriented API like date-fns.
4
5Migrated from folder: Modules/luxonExample

ramdaExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# ramda
2
3[ramda](https://ramdajs.com/) is a module like [lodash](https://www.val.town/v/tmcw.lodashExample) or [underscore](https://www.val.town/v/tmcw.underscoreExample) but with a much heavier emphasis on functional programming. It lets you do the same kind of things but in a much 🌶️ spicier, 💪 more macho, 🤔 sometimes confusing style. I was really into this module in my late 20s.
4
5Migrated from folder: Modules/ramdaExample

underscoreExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# underscore
2
3[underscore](https://underscorejs.org/) is a module for functional programming and other utilities in JavaScript. It inspired [lodash](https://www.val.town/v/tmcw.lodashExample), which is what most people use now, because lodash is both faster, and provides an ESM version which is convenient to use in Val Town.
4
5Note that while we can import from `lodash-es` and use its named exports, `underscore` only provides a default export, so that's why we have the code `{ default: _ }` below.

lodashExampleREADME.md1 match

@tmcwUpdated 1 year ago
1# lodash
2
3[Lodash](https://lodash.com/) is the most popular npm module. It provides helpers for functional programming, common algorithms, and a lot more. Before JavaScript had built-in methods for [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), lodash (and [underscore](https://underscorejs.org/) before it) provided those methods.
4
5Migrated from folder: Modules/lodashExample

getFileEmail4 file matches

@shouserUpdated 6 days ago
A helper function to build a file's email

TwilioHelperFunctions

@vawogbemiUpdated 2 months ago