MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / count

Function count

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

Source from the content-addressed store, hash-verified

5}
6
7export function count<T>(arr: readonly T[], pred: (x: T) => unknown): number {
8 let n = 0
9 for (const x of arr) n += +!!pred(x)
10 return n
11}
12
13export function uniq<T>(xs: Iterable<T>): T[] {
14 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