Sha1 implementation in farfetched is very large and probably not so fast. We don't need cryptography-grade implementation for that case, so we can pick much simpler implementation from effector/babel-plugin:
function hashCode(s: string) {
let h = 0
let i = 0
while (i < s.length) h = ((h << 5) - h + s.charCodeAt(i++)) | 0
return h.toString(36)
}
It's came from java and battle-tested in effector itself
Sha1 implementation in farfetched is very large and probably not so fast. We don't need cryptography-grade implementation for that case, so we can pick much simpler implementation from effector/babel-plugin:
It's came from java and battle-tested in effector itself