MCPcopy Index your code
hub / github.com/anomalyco/opencode / count

Function count

packages/opencode/test/tool/edit.test.ts:350–357  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

348 }
349
350 const count = (content: string) => {
351 const crlf = content.match(/\r\n/g)?.length ?? 0
352 const lf = content.match(/\n/g)?.length ?? 0
353 return {
354 crlf,
355 lf: lf - crlf,
356 }
357 }
358
359 const expectLf = (content: string) => {
360 const counts = count(content)

Callers 2

expectLfFunction · 0.70
expectCrlfFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected