We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return
enter
leave
Hey y'all
I think it would be great if there was an easy way to break the tree traversal and return something by calling return ....
return ...
Then, this code would be possible:
const result = walk(ast, {enter(node) { if(node === condition) return something }}) // Logs the value of something console.log(result)
What do you think?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey y'all
I think it would be great if there was an easy way to break the tree traversal and return something by calling
return ...
.Then, this code would be possible:
What do you think?
The text was updated successfully, but these errors were encountered: