UNPKG

245 BJavaScriptView Raw
1'use strict';
2
3const murmur = require('imurmurhash');
4
5/**
6 * hash the given string
7 * @param {string} str the string to hash
8 * @returns {string} the hash
9 */
10module.exports = function hash(str) {
11 return murmur(str).result().toString(36);
12};