mattbierner / hamt

Javascript Hash Array Mapped Trie
MIT License
251 stars 16 forks source link

Pass default value to transform function in case entry doesn't exists by key #19

Closed dashed closed 8 years ago

dashed commented 8 years ago

Closes https://github.com/mattbierner/hamt/issues/14

dashed commented 8 years ago

I added the suggested fixes.

mattbierner commented 8 years ago

Thanks for the change. I added it with Hamt v2.2 but instead of an overload, ended up creating a separate function called modifyValue that takes a defaultValue. Hope that is ok. The code was getting kind of messy dealing with the overload logic.

dashed commented 8 years ago

Yep no problem. :+1:

The PR didn't get the attention it needed in the past few days; sorry about that. :sweat: