Implement pathOf function for extracting property paths from lambda expressions#72
Draft
Implement pathOf function for extracting property paths from lambda expressions#72
Conversation
Co-authored-by: manni497 <65862280+manni497@users.noreply.github.com>
…xpressions Co-authored-by: manni497 <65862280+manni497@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Function to get full path of nested object property
Implement pathOf function for extracting property paths from lambda expressions
Jul 17, 2025
manni497
requested changes
Jul 17, 2025
yarn.lock
Outdated
| @@ -4,37 +4,15 @@ | |||
|
|
|||
| "@ampproject/remapping@^2.2.0": | |||
| version "2.2.1" | |||
| resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" | |||
| resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" | |||
Collaborator
There was a problem hiding this comment.
@copilot I think you run the wrong command to install package depencies. Please undo this and package-lock.json and use 'yarn' instead of 'npm install' to install your dependencies
Contributor
Author
There was a problem hiding this comment.
Fixed! I've removed the package-lock.json file and restored yarn.lock to its original state, then used yarn to install dependencies. Commit e47fb70 addresses this issue.
… npm Co-authored-by: manni497 <65862280+manni497@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a new
pathOffunction that extracts property paths from lambda expressions, similar to the C#ExpressionUtils.PathOffunctionality.Features
The
pathOffunction takes a lambda expression and returns the property path as a string:Implementation
The function uses JavaScript Proxy to intercept property access and build the path string:
Testing
Added 8 comprehensive test cases covering:
All existing tests continue to pass (412 tests total), ensuring no regressions.
Code Quality
Fixes #14.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.