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

Function isJsClassExpression

src/resolution/js-class-expressions.ts:41–43  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

39
40/** Whether `node` is a class a named class expression declares. */
41export function isJsClassExpression(node: Node): boolean {
42 return node.kind === 'class' && !!node.signature && CLASS_EXPRESSION_REF_LANGUAGES.has(node.language);
43}
44
45/** The end of the text before a class a CommonJS module exports: `module.exports = `, `exports.Router = `, `module.exports.Router = `. */
46const COMMONJS_EXPORT_BEFORE = /(?:^|[^\w$.])(?:module\.)?exports(?:\.[A-Za-z_$][\w$]*)?\s*=\s*$/;

Callers 1

classExpressionsMethod · 0.90

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected