(str: string)
| 388 | * @since 2.0.0 |
| 389 | */ |
| 390 | export const string = (str: string) => { |
| 391 | let h = 5381, i = str.length |
| 392 | while (i) { |
| 393 | h = (h * 33) ^ str.charCodeAt(--i) |
| 394 | } |
| 395 | return optimize(h) |
| 396 | } |
| 397 | |
| 398 | /** |
| 399 | * Computes a hash value for an object using only the specified keys. |