diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-15 11:37:06 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-15 11:37:06 +0800 |
| commit | ee6ed655390e6159a57ca1fe1725fd5294e66efb (patch) | |
| tree | 4d0e7e59117d9122fdaa16d40df878ec59573df2 /src/utility.js | |
| parent | da471403e72387a004905af11b2bc8ec5db25b62 (diff) | |
fix: generate truly unique IDs
Diffstat (limited to 'src/utility.js')
| -rw-r--r-- | src/utility.js | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/utility.js b/src/utility.js deleted file mode 100644 index f2ee3fb..0000000 --- a/src/utility.js +++ /dev/null @@ -1,11 +0,0 @@ -export default class Utility { - static hashCode(str) { - let hash = 0; - for (let i = 0, len = str.length; i < len; i++) { - let chr = str.charCodeAt(i); - hash = (hash << 5) - hash + chr; - hash |= 0; // Convert to 32bit integer - } - return (hash>0) ? hash : -hash; - } -} |
