# Snippets

> About 900 small functions, components and hooks in Go, Python, JavaScript, React and C#, searchable alongside the rest of the wiki.

Canonical: https://www.wiki.jodisand.me/snippets/
Reviewed: 2026-09-24
Related: [Go](https://www.wiki.jodisand.me/go/index.md), [Python](https://www.wiki.jodisand.me/python/index.md), [TypeScript](https://www.wiki.jodisand.me/typescript/index.md), [Testing](https://www.wiki.jodisand.me/testing/index.md)


Most of these come from public snippet collections and are reproduced here so they can be searched with the rest of the wiki. Each one is a short example, not a library: none validates its input, handles errors or considers allocation in a hot path, and none ships with tests. Read the explanation and the edge cases before copying one, then add the validation and tests your code needs. For language guidance see [Go](https://www.wiki.jodisand.me/go/), [Python](https://www.wiki.jodisand.me/python/) and [TypeScript](https://www.wiki.jodisand.me/typescript/).


## Sections

- [C# snippets](https://www.wiki.jodisand.me/snippets/csharp/index.md): Small C# methods for collections, strings, maths and dates, each with a short explanation and an example call.
- [Go snippets](https://www.wiki.jodisand.me/snippets/go/index.md): Small Go functions for slices, strings and maths, each with a short explanation and an example call.
- [JavaScript snippets](https://www.wiki.jodisand.me/snippets/javascript/index.md): Small JavaScript functions for arrays, objects, strings, dates and the browser DOM, each with a short explanation and an example call.
- [Python snippets](https://www.wiki.jodisand.me/snippets/python/index.md): Small Python functions for lists, dictionaries, strings, maths and dates, each with a short explanation and an example call.
- [React snippets](https://www.wiki.jodisand.me/snippets/react/index.md): React components such as accordions, modals and data tables, and hooks for state, events and browser APIs, each with an example use.
