Skip to content
New issue

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

Should NodePath.contains be startsWith? #23

Closed
cplir-c opened this issue Nov 19, 2021 · 3 comments
Closed

Should NodePath.contains be startsWith? #23

cplir-c opened this issue Nov 19, 2021 · 3 comments

Comments

@cplir-c
Copy link
Contributor

cplir-c commented Nov 19, 2021

The current method checks if this NodePath starts with the other nodePath, but calls it contains.

@CheaterCodes
Copy link
Contributor

The way it's right now, it's contains.

startsWith would be equivalent to other.contains(this).

startsWith would be equivalent to this.isContainedIn(other).

@CheaterCodes
Copy link
Contributor

Just to be clear, I think startsWith is a better name, but we'd also have to flip the logic.

@CheaterCodes
Copy link
Contributor

I'll move this over to #27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants