For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt, and this page is available as Markdown at https://massaman.dev/overview.md.

massaman

Functional programming utilities for TypeScript. Rust's match and Result in TypeScript, layered over es-toolkit and ts-pattern.

npm install massaman
import { match, P, attempt, isOk } from 'massaman'

const result = attempt(() => JSON.parse(input))

const message = match(result)
  .with({ ok: true }, ({ value }) => `parsed ${typeof value}`)
  .with({ ok: false }, ({ error }) => `failed: ${error.message}`)
  .exhaustive()

Where to start