alexbol99 / flatten-interval-tree

Interval binary search tree
MIT License
41 stars 21 forks source link

Question about cloning in IntervalTree #36

Closed angrycat9000 closed 2 years ago

angrycat9000 commented 2 years ago

Thanks for creating this package.

I was working with it and noticed that it creates clones of the key and value objects instead of just using the original objects. I was curious about what was the reason for this?

https://github.com/alexbol99/flatten-interval-tree/blob/f1293e5e1ab902e6a0c0ee8364434ad04cc48d18/src/classes/node.js#L81-L83

Asking because I ran into an issue in my code where IntervalTree had cloned a value and my code was expecting to get the same object back (not a clone).

alexbol99 commented 2 years ago

Hi, Mark Indeed, no reason. I will update the package. Thank you for cooperation Alex

alexbol99 commented 2 years ago

Released in version v1.0.18