MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / guardsAt

Function guardsAt

__tests__/branch-guards.test.ts:206–210  ·  view source on GitHub ↗

The guards at the site, unjoined.

(src: string, needle: string, language: 'tsx' | 'typescript' | 'swift' = 'tsx')

Source from the content-addressed store, hash-verified

204describe('branch guards: the arms of one decision', () => {
205 /** The guards at the site, unjoined. */
206 async function guardsAt(src: string, needle: string, language: 'tsx' | 'typescript' | 'swift' = 'tsx') {
207 const line = lineOf(src, needle);
208 const column = src.split('\n')[line - 1]!.indexOf(needle);
209 return guardsInSource(src, language, line, column);
210 }
211
212 const ifElse = `
213export async function authUser(req, res) {

Callers 1

Calls 2

guardsInSourceFunction · 0.90
lineOfFunction · 0.70

Tested by

no test coverage detected