Sha256: 1db8ee5544f4048d776840ea34c7f7ec08fdddf4f0dde0adea0728c13a8b7c4f
Contents?: true
Size: 1.04 KB
Versions: 45
Compression:
Stored size: 1.04 KB
Contents
/** * @fileoverview Defining the hashing function in one place. * @author Michael Ficarra */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ var 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
45 entries across 45 versions & 2 rubygems