I just wanted to fix the harmless double seen.set() for Set and Map clones introduced in #301, but found a new bug: Hoek.clone() does not transfer the prototype of a subclassed Set or Map.
I did a fix for this, but found that objects created using Object.create(proto) are broken. Instead I ended up at this, where I create a base object, and change its prototype (if required).
There is a lot of changes here, but most is refactoring to make a somewhat clean and performant implementation.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
I just wanted to fix the harmless double
seen.set()
forSet
andMap
clones introduced in #301, but found a new bug:Hoek.clone()
does not transfer the prototype of a subclassedSet
orMap
.I did a fix for this, but found that objects created using
Object.create(proto)
are broken. Instead I ended up at this, where I create a base object, and change its prototype (if required).There is a lot of changes here, but most is refactoring to make a somewhat clean and performant implementation.