Sha256: 2e00d51f834885fc669fc0b03b343e4d1313d6d95c58ea1d0491df6e811f1089
Contents?: true
Size: 1.04 KB
Versions: 77
Compression:
Stored size: 1.04 KB
Contents
/** * @fileoverview Defining the hashing function in one place. * @author Michael Ficarra */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ const murmur = require("imurmurhash"); //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // Private //------------------------------------------------------------------------------ /** * hash the given string * @param {string} str the string to hash * @returns {string} the hash */ function hash(str) { return murmur(str).result().toString(36); } //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ module.exports = hash;
Version data entries
77 entries across 67 versions & 3 rubygems