| 496 | 496 | |
| 497 | 497 | /** |
| 498 | 498 | * Calculates a hash code for a string. |
| 499 | + * cyrb53 (c) 2018 bryc ({@link https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js|github.com/bryc}) |
| 500 | + * License: Public domain (or MIT if needed). Attribution appreciated. |
| 501 | + * A fast and simple 53-bit string hash function with decent collision resistance. |
| 502 | + * Largely inspired by MurmurHash2/3, but with a focus on speed/simplicity. |
| 499 | 503 | * @param {string} str The string to hash. |
| 500 | 504 | * @param {number} [seed=0] The seed to use for the hash. |
| 501 | 505 | * @returns {number} The hash code. |