hash.mjs 231 B

12345678910
  1. import MurmurHash3 from 'imurmurhash';
  2. /**
  3. * hash the given string
  4. * @param {string} str the string to hash
  5. * @returns {string} the hash
  6. */
  7. export default function hash(str) {
  8. return MurmurHash3(str).result().toString(36);
  9. }