Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

discussion for setIn implementation? #66

Closed
seethroughdev opened this issue Dec 3, 2018 · 1 comment
Closed

discussion for setIn implementation? #66

seethroughdev opened this issue Dec 3, 2018 · 1 comment

Comments

@seethroughdev
Copy link

seethroughdev commented Dec 3, 2018

Is there discussion or an existing solution for a setInversion? It seems like it could maintain the same api and just add an extra param to set value if path exists.

similar to: https://lodash.com/docs/4.17.11#set

Seems like this would be useful to others?

@yungsters
Copy link
Contributor

That is beyond the scope of idx which was originally meant as a stop-gap solution while optional chaining was still being evaluated for the JavaScript language.

Furthermore, this might significantly complicate the type definition and validation of idx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants