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

fix(set): avoid false positive of array index in path #15

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

aleclarson
Copy link
Member

@aleclarson aleclarson commented Jun 24, 2024

Description

Avoid cases in set(…) where a key starts with an integer (but is not only an integer) being inferred as an array index.

Checklist

  • Changes are covered by tests if behavior has been changed or added
  • Tests have 100% coverage
  • If code changes were made, the documentation (in the /docs directory) has been updated

Resolves

Resolves sodiray/radash#383 and sodiray/radash#357

Thanks @UnKnoWn-Consortium

UnKnoWn-Consortium and others added 3 commits June 23, 2024 22:20
- avoid an array allocation from `Array.prototype.filter`
- use the `isIntString` function for integer key detection
- use a reducer to be more concise
- use the ??= operator to be more concise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream fix Fixes a bug that existed in Radash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants