mirror of
https://gh.wpcy.net/https://github.com/djav1985/v-wordpress-plugin-updater.git
synced 2026-04-28 08:02:16 +08:00
10 lines
231 B
JavaScript
10 lines
231 B
JavaScript
import MurmurHash3 from 'imurmurhash';
|
|
|
|
/**
|
|
* hash the given string
|
|
* @param {string} str the string to hash
|
|
* @returns {string} the hash
|
|
*/
|
|
export default function hash(str) {
|
|
return MurmurHash3(str).result().toString(36);
|
|
}
|