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

Function isCommonJsExportedClass

src/resolution/js-class-expressions.ts:54–58  ·  view source on GitHub ↗
(node: Node, lines: readonly string[])

Source from the content-addressed store, hash-verified

52 * and, through an instance, its methods, as it reaches a declaration's.
53 */
54export function isCommonJsExportedClass(node: Node, lines: readonly string[]): boolean {
55 const line = lines[node.startLine - 1];
56 if (line === undefined) return false;
57 return COMMONJS_EXPORT_BEFORE.test(`${lines[node.startLine - 2] ?? ''}\n${line.slice(0, node.startColumn)}`);
58}
59
60/** Whether the reference is written inside `node`'s source range. */
61export function writtenIn(node: Node, ref: UnresolvedRef): boolean {

Callers 1

classExpressionsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected