MCPcopy Index your code
hub / github.com/danvk/webdiff / strArrayLen

Function strArrayLen

ts/codediff/char-diffs.ts:7–9  ·  view source on GitHub ↗
(x: string[])

Source from the content-addressed store, hash-verified

5export type CharacterDiff = [OpType | 'skip' | null, number, number];
6
7function strArrayLen(x: string[]) {
8 return x.reduce((a, b) => a + b.length, 0);
9}
10
11function allWhitespace(x: string) {
12 return !!/^\s*$/.exec(x);

Callers 1

computeCharacterDiffsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected