hash.cjs 403 B

12345678910111213141516
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. const MurmurHash3 = require('imurmurhash');
  5. /**
  6. * hash the given string
  7. * @param {string} str the string to hash
  8. * @returns {string} the hash
  9. */
  10. function hash(str) {
  11. return MurmurHash3(str).result().toString(36);
  12. }
  13. module.exports = hash;