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

Function isTopLevel

tools/eslint-rules/no-duplicate-requires.js:19–25  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

17]);
18
19const isTopLevel = (node) => {
20 while (node) {
21 if (topLevelTypes.has(node.type)) return false;
22 node = node.parent;
23 }
24 return true;
25};
26
27module.exports = {
28 create(context) {

Callers 1

CallExpressionFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected