apps/kirjs/src/app/modules/ast/samples/find-debugger/traverse-debugger-babel.solved.ts
function traverseDebuggerSolved(code, { babylon, babelTraverse, log }) {
const ast = babylon.parse(code);
let hasCode = false;
babelTraverse(ast, {
DebuggerStatement: () => {
hasCode = true;
}
});
return hasCode;
}