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

Function elementAt

src/resolution/angular-template-synthesizer.ts:162–167  ·  view source on GitHub ↗

The element a binding at `at` is written on: the last opening tag before it.

(text: string, at: number)

Source from the content-addressed store, hash-verified

160
161/** The element a binding at `at` is written on: the last opening tag before it. */
162function elementAt(text: string, at: number): string | null {
163 const open = text.lastIndexOf('<', at);
164 if (open < 0) return null;
165 const tag = /^<([a-zA-Z][\w-]*)/.exec(text.slice(open, open + 64));
166 return tag ? tag[1]! : null;
167}
168
169/** A `routerLink:` field of an object literal written in a class. */
170const ROUTER_LINK_FIELD = /(?<![\w$.])routerLink\s*:\s*/g;

Callers 1

angularTemplateEdgesFunction · 0.85

Calls 1

execMethod · 0.65

Tested by

no test coverage detected