MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / findFunctionInClass

Function findFunctionInClass

scripts/check_experiments.js:42–49  ·  view source on GitHub ↗

* Finds a function declaration node inside a class declaration node

(classNode, functionName)

Source from the content-addressed store, hash-verified

40 * Finds a function declaration node inside a class declaration node
41 */
42function findFunctionInClass(classNode, functionName) {
43 for (const node of classNode.declaration.body.body) {
44 if (node.key.name === functionName) {
45 return node;
46 }
47 }
48 return null;
49}
50
51/**
52 * Determines if AST Node is a call to register a DevtoolsExperiment

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected