-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: add prop to include deep nesting #3427
Conversation
Hi @ridge-kimani , we have R.path for this. |
Hello @kedashoe. Yeah sure. I saw the need to add deep nesting to extend R.prop functionality to be similar to R.path. |
As an isolated change, this introduces a great inconsistency in Ramda's API. Where they now accept a property name, all the various In Ramda, the name "prop" refers to an established mental image/concept which is of great benefit when reasoning about code. |
I have to agree with @kedashoe , this function already exists as R.path. If we really wanted this functionality, I feel like it would make more sense to upgrade R.path to also support props, as it already is the function that does "more"? Or just have a new function that decides whether to call prop or path? I also ran a quick benchmark of path and this new prop function, and it runs significantly slower when inputting an array. This is likely due to creating a lot of new functions due to using curried and arrow functions, creating some new arrays in reduce and not exiting when possible.
|
I've seen it will also have some inconsistencies with other functions like Thanks for the feedback. I will close this issue. |
Description
closes #3426
Type of change
How Has This Been Tested?
npm test
andnpm run browser_test