Created
September 22, 2017 15:55
-
-
Save WebReflection/14d135b9a2b988ea8073d1098b0abd0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hash(str) { | |
| var hval = 0x811c9dc5, i = 0, length = str.length; | |
| while (i < length) { | |
| hval ^= str.charCodeAt(i++); | |
| hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24); | |
| } | |
| return hval >>> 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment