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

Add handling of arrays of objects #30

Merged
merged 4 commits into from
Jul 25, 2024
Merged

Add handling of arrays of objects #30

merged 4 commits into from
Jul 25, 2024

Conversation

AnthonyFuller
Copy link
Contributor

As title.

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
src/arrayHandling.ts 100.00% <100.00%> (ø)
tests/inarray.spec.ts 100.00% <100.00%> (ø)

... and 19 files with indirect coverage changes

Copy link
Member

@RDIL RDIL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is some really weird stuff that really should not be possible, but here we are. i've looked at it and am worried these things might break

src/arrayHandling.ts Outdated Show resolved Hide resolved
// handle properties of an object
if (typeof item === "object") {
const newReference = `$${reference.substring(
reference.indexOf("#.") + 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking this could break in the scenario of nested $inarray/$any/$all (unless im actually a coding genius and thought of that when building this function, which I might have, but still worth double checking)

Copy link
Contributor Author

@AnthonyFuller AnthonyFuller Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it might, but since it's actually checking if it's before before it returns something, it shouldn't. The code before it does something similar to this. There probably needs to be a test for this.

@RDIL RDIL self-assigned this Jul 25, 2024
@RDIL RDIL added the enhancement New feature or request label Jul 25, 2024
@RDIL RDIL merged commit 2b24a25 into main Jul 25, 2024
2 checks passed
@RDIL RDIL deleted the any-object branch July 25, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants