bounce-classifier

11 releases measured. Default branch at 59ebd642, 2026-10-19, 2 files.

Source lines
735
Maintainability index
53.7
Mean CC per function
3.27
Functions with CC > 20
0
of 51
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
classify src/index.js:855 37.8 14 51
loadWeightsWithProgress src/index.js:586 42.7 10 34
<anonymous> src/index.js:798 43.6 7 35
forward src/index.js:699 44.6 8 30
main build.js:8 47.5 1 31
parseWeights src/index.js:633 50.5 1 23
identifyBlocklist src/index.js:429 50.8 8 19
initialize src/index.js:779 52.2 8 18
softmax src/index.js:677 52.6 5 17
classifyBatch src/index.js:939 52.9 4 17
loadModelFile src/index.js:549 53.7 4 16
sanitizeMessage src/index.js:462 54.0 7 15
tokenize src/index.js:527 55.3 3 14
registerTextFallback src/index.js:275 56.4 6 13
getDefaultModelPath src/index.js:748 56.6 3 14
Every measured release 11
Release Date Files Source lines Functions MI Mean CC P90 CC Max CC CC > 10 CC > 20
default branch 2026-10-19 2 735 51 53.7 3.27 8 14 1 0
v3.0.2 2026-10-19 2 771 51 53.5 3.27 8 14 1 0
v3.0.1 2026-09-28 2 769 51 53.6 3.24 8 12 1 0
v3.0.0 2026-04-23 2 705 48 53.6 3.27 8 10 0 0
v2.4.0 2026-03-16 2 588 36 54.1 3.19 7 10 0 0
v2.3.0 2026-03-16 2 588 36 54.1 3.19 7 10 0 0
v2.2.0 2026-03-16 2 581 36 54.1 3.19 7 10 0 0
v2.1.0 2026-03-16 2 563 35 54.3 3.06 7 10 0 0
v2.0.0 2025-12-15 2 557 34 54.1 3.06 7 10 0 0
v1.2.1 2025-12-14 2 567 30 50.5 3.47 7 12 1 0
v1.2.0 2025-12-14 2 519 28 51.3 3.29 8 10 0 0
v1.1.0 2025-12-14 2 519 28 51.3 3.29 8 10 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.