How-to guides
These guides solve specific, real-world tasks with byenull. Each one assumes you know the library's basics. If you don't, check out the tutorial first.
Working with the library
- Choosing an Import Style:
OptionvsO, tree-shaking, and keeping a codebase consistent - Handling Nullish Values: recipes for
find,Map.get, DOM queries, environment variables, and third-party SDKs
Async and interop
- Mixing Sync and Async: one pipeline, both worlds, one
await - Converting Between Option and Result: crossing the boundary to @praha/byethrow
Testing
- Testing Options: the
toBeSome/toBeNonematchers for Vitest and Jest