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

equals should compare regexps by comparing .source and .flags #48

Open
LeaVerou opened this issue Jul 10, 2024 · 2 comments
Open

equals should compare regexps by comparing .source and .flags #48

LeaVerou opened this issue Jul 10, 2024 · 2 comments

Comments

@LeaVerou
Copy link
Owner

No description provided.

@LeaVerou LeaVerou changed the title equals should compare regexps by comparing .source equals should compare regexps by comparing .source and .flags Jul 10, 2024
@LeaVerou
Copy link
Owner Author

Hm or maybe the default .toString()

@LeaVerou
Copy link
Owner Author

So, neither actually. RegExp flags are sorted when reserialized, so we should take that into account when comparing and not fail because of flag ordering.

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

1 participant