npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

functype-eval

v1.8.0

Published

Fitness scoring and LLM evaluation for functional TypeScript codebases using the functype ecosystem

Downloads

531

Readme

functype-eval

Fitness scoring for functional TypeScript codebases using the functype ecosystem.

functype-eval measures how well a TypeScript codebase adheres to functype / functional-programming idioms and produces a 0–100 fitness score with a per-dimension breakdown. It runs eslint-plugin-functype programmatically (no shelling out), plus type-coverage and a non-null-assertion scan, and aggregates the results.

Install

pnpm add -D functype-eval
# or run directly
npx functype-eval score ./src

Usage

functype-eval score <target>            # score a directory, print breakdown + 0–100
functype-eval score ./src --json        # machine-readable output (for CI)
functype-eval score ./src --threshold 80   # exit 1 if score < 80 (CI gate)
functype-eval score ./src --project tsconfig.json   # explicit tsconfig for type-coverage

Exit codes: 0 scored ok (and at/above --threshold if given), 1 score below --threshold, 2 no TypeScript sources found under the target (nothing to score — guards against a misleading 100/100 on an empty or non-TS directory).

Example

functype-eval score ./src

  Dimension       Weight   Score
  ─────────────────────────────────
  immutability     0.15     0.94
  option           0.15     0.88
  either           0.15     0.91
  composition      0.10     0.97
  collections      0.10     1.00
  do-notation      0.05     1.00
  safety           0.10     1.00
  loops            0.05     0.96
  type-coverage    0.10     0.99
  non-null         0.05     1.00
  ─────────────────────────────────
  Fitness score:  94 / 100

How the score works

The composite is a weighted sum of ten dimensions (see CLAUDE.md for the full table and weights). The eight ESLint dimensions and the non-null dimension are normalized by violation density per 1000 lines of code:

score = 1 / (1 + (violations / KLOC) * k)

type-coverage contributes its native percentage. If the target has no resolvable tsconfig.json, the type-coverage dimension is skipped and the remaining weights are renormalized — you still get a score. Weights and per-dimension sensitivity are overridable via an optional functype-eval.config.json.

The score is deterministic: same input → same output. No network, no LLM calls.

Roadmap

  • Phase 1 (current): the score CLI.
  • Phase 2: functype-eval bench — run programming tasks through LLMs and score the output with this same engine.
  • Phase 3: an MCP server exposing score-codebase / suggest-functype-fix.

License

MIT © Jordan Burke