MCPcopy
hub / github.com/codeaashu/claude-code / count

Function count

src/utils/array.ts:5–9  ·  view source on GitHub ↗
(arr: readonly T[], pred: (x: T) => unknown)

Source from the content-addressed store, hash-verified

3}
4
5export function count<T>(arr: readonly T[], pred: (x: T) => unknown): number {
6 let n = 0
7 for (const x of arr) n += +!!pred(x)
8 return n
9}
10
11export function uniq<T>(xs: Iterable<T>): T[] {
12 return [...new Set(xs)]

Callers 15

queryLoopFunction · 0.85
runFunction · 0.85
getProgressStatsFunction · 0.85
calculateAgentStatsFunction · 0.85
bashToolHasPermissionFunction · 0.85
countWorktreeChangesFunction · 0.85
useKeybindingWarningsFunction · 0.85
_temp4Function · 0.85
_temp2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected