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

Function ownMethodWithoutReceiver

src/ui-server/api/steps.ts:585–590  ·  view source on GitHub ↗
(caller: Node, target: Node, written: string)

Source from the content-addressed store, hash-verified

583 * way. Only there: `self.` is a convention elsewhere, not a rule.
584 */
585 const ownMethodWithoutReceiver = (caller: Node, target: Node, written: string): boolean => {
586 if (!JS_FAMILY.has(caller.language) || target.kind !== 'method') return false;
587 if (/^(?:this|self)[.?]/.test(written)) return false;
588 const container = (q: string) => q.replace(/[.:]+[^.:]*$/, '');
589 return caller.filePath === target.filePath && container(caller.qualifiedName) === container(target.qualifiedName);
590 };
591
592 /** A method the walk cannot enter (an interface's, an ORM's) on a repository-shaped container. */
593 const repositoryMethod = (target: Node): boolean => {

Callers 1

buildStepsFunction · 0.85

Calls 2

containerFunction · 0.85
hasMethod · 0.80

Tested by

no test coverage detected