joi-messages

13 releases measured. Default branch at 09595cc0, 2026-10-19, 2 files.

Source lines
78
+9.9% in a year
Maintainability index
46.2
-1.2 in a year
Mean CC per function
10.00
Functions with CC > 20
0
of 1
Size

Lines of code, comments and blank lines left out

Maintainability index

Mean over functions, weighted by their lines. Higher is better

Cyclomatic complexity per function

Lower is better

Hard to maintain

Share of functions, and of function code, past the usual limits. Lower is better

Least maintainable functions now

Function Location MI CC Lines
messages index.js:7 46.2 10 25
Every measured release 13
Release Date Files Source lines Functions MI Mean CC P90 CC Max CC CC > 10 CC > 20
default branch 2026-10-19 2 78 1 46.2 10.00 10 10 0 0
v1.3.1 2026-09-28 2 78 1 46.2 10.00 10 10 0 0
v1.3.0 2026-09-13 2 71 1 47.4 9.00 9 9 0 0
v1.2.0 2026-09-13 2 71 1 47.4 9.00 9 9 0 0
v1.1.3 2026-09-12 2 71 1 47.4 9.00 9 9 0 0
v1.1.2 2026-09-12 2 71 1 47.4 9.00 9 9 0 0
v1.1.1 2026-09-12 2 71 1 47.4 9.00 9 9 0 0
v1.1.0 2026-09-12 2 71 1 47.4 9.00 9 9 0 0
v1.0.5 2025-04-28 2 71 1 47.4 9.00 9 9 0 0
v1.0.4 2025-01-29 2 71 1 47.4 9.00 9 9 0 0
v1.0.3 2025-01-29 2 71 1 47.4 9.00 9 9 0 0
v1.0.2 2024-04-12 2 71 1 47.4 9.00 9 9 0 0
v1.0.1 2024-01-30 2 71 1 47.4 9.00 9 9 0 0
v1.0.0 2024-01-30 2 71 1 47.4 9.00 9 9 0 0
How the numbers are made

Library source only: lib/, src/, workers/, bin/ and top-level source files. Tests, examples, tooling, type declarations and generated or minified files are left out.

Source lines are lines carrying code, with blank lines and comments dropped.

Cyclomatic complexity (CC) counts the independent paths through a function: 1 plus every if, loop, case, catch, ternary, && / || / ??, optional chain and default parameter. Above 10 a function is commonly considered hard to test, above 20 hard to understand.

Maintainability index (MI) is computed per function as max(0, (171 - 5.2 ln(Halstead volume) - 0.23 CC - 16.2 ln(lines)) * 100 / 171), the 0 to 100 scale Visual Studio uses, where below 20 is poor. The repository figure weights each function by its lines. Code outside any function (lookup tables, schemas, declarations) counts toward size only. MI is driven mostly by size, so read it as a trend, not a grade.

A move from JavaScript to TypeScript adds type annotations to every function, which raises the Halstead volume and lowers MI without the logic changing. Expect a step at that release.

Measured Mon, 19 Oct 2026 19:28:19 GMT.