Commit counts measure activity. They do not measure whether any of it is still there.
I found this out while trying to describe my share of two private codebases in a way a stranger could check. Commits were the obvious number and the wrong one. On the frontend my share of surviving lines was higher than my commit share, which meant my code had replaced other people's. On the backend it was lower, which meant the opposite. Both facts said more than either count.
So I wrote the script properly and published it. One file, no dependencies, Node 20 or newer.
npx surviving-lines --sample 5 --include '**/*.ts' --exclude '**/*.test.ts'
Enter fullscreen mode






