rtfeldman / seamless-immutable

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.
BSD 3-Clause "New" or "Revised" License
5.36k stars 194 forks source link

Handle creating an array for missing index properties. #235

Closed marbemac closed 1 year ago

marbemac commented 6 years ago

This brings seamless-immutable more in line with how lodash works. From the _.set documentation - "Arrays are created for missing index properties while objects are created for all other missing properties."

screen shot 2017-09-16 at 12 45 47 am

Seamless-immutable differing from lodash and not creating arrays for new indexes in paths has tripped us up a few times. Thoughts?

lottamus commented 6 years ago

Any updates on this?