Sha256: 96589233d547a6ce039dbf1a067214dd89ec02de6ca0057badb76780a01b478c
Contents?: true
Size: 1.04 KB
Versions: 44
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
44 entries across 44 versions & 2 rubygems