Stable JS value hash
Geek Repo:Geek Repo
Github PK Tool:Github PK Tool
shuding opened this issue 3 years ago · comments
const o1 = {}; o1.o = o1 const o2 = {}; o2.o = o2 hash(o1) !== hash(o2) // bug!
To fix this problem, we need an extra WeakMap and a reference counter only for recursive hash executions.
WeakMap