MCPcopy Create free account
hub / github.com/nodejs/node / isTopLevelDeclaration

Function isTopLevelDeclaration

lib/internal/repl/await.js:25–27  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

23const { Recoverable } = require('internal/repl');
24
25function isTopLevelDeclaration(state) {
26 return state.ancestors[state.ancestors.length - 2] === state.body;
27}
28
29const noop = FunctionPrototype;
30const visitorsWithoutAncestors = {

Callers 2

ClassDeclarationFunction · 0.70
VariableDeclarationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected