Feature request: add ability to prevent modifying certain value in `unflatten`
Open
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
I have a use case where I'd like to prevent the `target`'s value from being modified in `unflatten`. There's probably a number of ways to approach it but here's what I was thinking:
```js
// prevent modifying any object with a value of 'testValue'
unflatten(obj, {filter: {value: 2}})
// prevent modifying any object with a key of 'thing'
unflatten(obj, {filter: {key: 'thing'}})
// prevent modifying the object {thing: 2}
unflatten(obj, {filter: {key: 'thing', value: 2}})
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.