MCPcopy Index your code
hub / github.com/nodejs/node / exits

Function exits

tools/eslint-rules/no-cryptokey-public-accessors.js:49–60  ·  view source on GitHub ↗
(statement)

Source from the content-addressed store, hash-verified

47}
48
49function exits(statement) {
50 if (!statement) return false;
51 switch (statement.type) {
52 case 'BlockStatement':
53 return statement.body.length > 0 && exits(statement.body.at(-1));
54 case 'ReturnStatement':
55 case 'ThrowStatement':
56 return true;
57 default:
58 return false;
59 }
60}
61
62function findStatementInBlock(node) {
63 let current = node;

Callers 1

Calls 1

atMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…