1export async function parseXML(xml) {
2 const { XMLParser } = await import("https://esm.sh/fast-xml-parser@4.1.2");
3 const parser = new XMLParser();
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function testMutateSemantics({
5 stateName,
6 api,
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
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
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
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.
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