(s)
| 1636 | } |
| 1637 | |
| 1638 | function hashCode (s) { |
| 1639 | if (s.length == 0) return 0; |
| 1640 | let hash = 0; |
| 1641 | for (let i = 0; i < s.length; i++) { |
| 1642 | hash = (hash << 5) - hash + s.charCodeAt(i); |
| 1643 | hash |= 0; // Convert to 32bit integer |
| 1644 | } |
| 1645 | return hash; |
| 1646 | }; |