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

Function firstLineOf

source code/utils/stringUtils.ts:46–49  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

44 * Used for shebang detection in diff rendering.
45 */
46export function firstLineOf(s: string): string {
47 const nl = s.indexOf('\n')
48 return nl === -1 ? s : s.slice(0, nl)
49}
50
51/**
52 * Counts occurrences of `char` in `str` using indexOf jumps instead of

Callers 4

loadRejectionDiffFunction · 0.85
loadDiffDataFunction · 0.85
execCommandHookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected