exceedsDepth
exceedsDepth(
ast,maxDepth):boolean
exceedsDepth determines whether an AST contains expressions nested at or beyond maxDepth.
The root expression has depth zero. Traversal stops at the first prohibited depth so checking adversarially deep loaded ASTs does not itself overflow the JavaScript call stack.
Parameters
Section titled “Parameters”AST | undefined
maxDepth
Section titled “maxDepth”number
Returns
Section titled “Returns”boolean