# evilsoft/crocks

A collection of well known Algebraic Data Types for your utter enjoyment.

Repository: https://github.com/evilsoft/crocks
Canonical: https://ross.abutalabs.com/products/crocks
Homepage: https://crocks.dev
Language: JavaScript
License: ISC
License Family: permissive
Topics: adt, predicate-functions, lift, unary-functions, functor, composition, curry, monoid, monad, pair
Last push: 2023-01-06T01:32:51+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3714, "days_push": 1336, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1598, forks 103 (observed 2026-08-28T04:05:09.342810+00:00)

## What it is
crocks is a zero-dependency JavaScript library of popular Algebraic Data Types (ADTs) such as Maybe, Either, IO, Async, and Pair, along with Monoids and a large set of helper functions like combinators, predicates, and point-free utilities. It provides a common interface across types so developers can write declarative, functional-style code and compose operations without imperative boilerplate.

## Use cases
- handle nullable values without null checks using Maybe
- model success/failure flows with Either or Result
- combine a list of values down to one with Monoids
- write point-free functional pipelines in JavaScript
- curry and compose functions declaratively
- manage side effects with IO and Async types
- combine predicate functions with logic combinators

## When to choose
- you want Fantasy Land-style ADTs (Maybe, Either, IO, Async) in JavaScript with a consistent interface
- you need tree-shakeable imports for frontend bundles
- you want a curated set of combinators, predicates, and point-free helpers alongside the types
- you prefer declarative, monadic error handling over imperative null/exception checks

## When to avoid
- your team is unfamiliar with functional programming concepts like monads and functors
- you need a library under active development with frequent updates
- you are working in a language with native ADT support or a more modern FP library
- you need async primitives beyond what Async provides, such as streams

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, developer-tools
- domain: programming-languages, developer-tools
- platform: cross-platform
- tags: functional-programming, algebraic-data-types, monads, monoids, fantasy-land, point-free, maybe, either, currying, function-composition, algorithms, nodejs, javascript

## Member repositories
- evilsoft/crocks (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.342810+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:53:16.444433+00:00, confidence not recorded.
  - readme: https://github.com/evilsoft/crocks (fetched 2026-08-28T04:05:09.342810+00:00, sha cbf424a9eee6)
  - homepage: https://crocks.dev (fetched 2026-08-29T11:24:58.019558+00:00, sha 9196c9ffa9cb)
  - site_page: https://crocks.dev/docs (fetched 2026-08-29T11:24:58.022251+00:00, sha c7d456402073)
  - site_page: https://crocks.dev/docs/getting-started.html (fetched 2026-08-29T11:24:58.024329+00:00, sha 04ab18bf5338)
  - site_page: https://crocks.dev/docs/crocks (fetched 2026-08-29T11:24:58.026273+00:00, sha 93c6abce8552)
  - site_page: https://crocks.dev/docs/monoids (fetched 2026-08-29T11:24:58.028700+00:00, sha eac8027d4744)
  - site_page: https://crocks.dev/docs/functions (fetched 2026-08-29T11:24:58.030463+00:00, sha 7d695abdfbd9)
  - registry_npm: https://registry.npmjs.org/crocks (fetched 2026-08-29T11:24:58.032282+00:00, sha 3466f93bc28d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
