robinvdvleuten/shvl

does return obj[p] = obj[p] has some meaning?

Closed this issue · 1 comments

I think return obj[p] || {} is already enough.

It is "misusing" one of the JS perils to set a nested default object value for set(obj, 'a.b.three', 'baz') or set(obj, 'one.two', 'bar'). You can modify the code yourself and see the failing testcases.