MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / findClassNode

Function findClassNode

lib/command/list.js:43–50  ·  view source on GitHub ↗
(ast)

Source from the content-addressed store, hash-verified

41}
42
43function findClassNode(ast) {
44 for (const node of ast.body) {
45 if (node.type === 'ClassDeclaration') return node
46 if (node.type === 'ExportNamedDeclaration' && node.declaration?.type === 'ClassDeclaration') return node.declaration
47 if (node.type === 'ExportDefaultDeclaration' && node.declaration?.type === 'ClassDeclaration') return node.declaration
48 }
49 return null
50}
51
52function stripJsDoc(value) {
53 return value

Callers 1

extractMethodDocsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected