Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This is really nice. May I use this code? Commented Mar 30, 2022 at 10:58
  • 1
    of course, you can. Commented Mar 31, 2022 at 11:07
  • For those you encounter that some hashes turn negative and the color is always gray. It turns our js converts to int32 and stuff, see SA. So I have changes the line from return char.charCodeAt(0) + ((acc << 5) - acc); to return char.charCodeAt(0) + ((acc << 5 >>> 0) - acc);
    – Leon
    Commented Jul 3, 2022 at 17:49