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:
// 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}})