# gigobyte/purify

Functional programming library for TypeScript - https://gigobyte.github.io/purify/

Repository: https://github.com/gigobyte/purify
Canonical: https://ross.abutalabs.com/products/purify
Language: TypeScript
License: ISC
License Family: permissive
Topics: typescript, algebraic-data-types, maybe, monad, functor, fantasy-land, functional-programming, either, result-type, option-type, codec, decode
Last push: 2025-12-16T09:02:32+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 57, release rhythm 49, longevity 100
- inputs: {"age_days": 3130, "days_push": 260, "days_rel": 260, "gap_med": 82, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1603, forks 62 (observed 2026-08-28T04:05:09.904883+00:00)

## What it is
Purify is a functional programming library for TypeScript providing algebraic data types like Maybe, Either, and Result, plus runtime type codecs. It is Fantasy Land conformant and emphasizes a practical, type-safe, developer-friendly API.

## Use cases
- handle nullable values without null checks in TypeScript
- model success/failure results with Either or Result types
- validate and decode untrusted JSON at runtime with type-safe codecs
- write functional-style TypeScript with monads and functors
- avoid throwing exceptions by encoding errors in return types
- chain computations safely with map and chain methods

## When to choose
- you want fp-ts-style functional patterns with a simpler, instance-method-based API
- you need runtime validation tightly integrated with TypeScript types
- you prefer a curated, practical FP library over a full port of another language's standard library

## When to avoid
- you need higher-kinded types or advanced type-level FP features
- your team is not comfortable with functional programming concepts
- you want a point-free programming style out of the box

## Facets
- artifact type: library
- maturity: active
- function: serialization, error-handling, type-system
- domain: programming-languages, developer-tools, web-development
- platform: browser, bun, cross-platform
- tags: functional-programming, typescript, algebraic-data-types, maybe, either, monad, fantasy-land, runtime-validation, codecs, option-type, result-type, nodejs, deno

## Member repositories
- gigobyte/purify (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.904883+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:52:23.174373+00:00, confidence not recorded.
  - readme: https://github.com/gigobyte/purify (fetched 2026-08-28T04:05:09.904883+00:00, sha b939f6d0a8f8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
