{"library":"murmurhash3js","title":"MurmurHash3.js","description":"MurmurHash3.js is a pure JavaScript implementation of the MurmurHash3 non-cryptographic hashing algorithms (x86 32-bit, x86 128-bit, and x64 128-bit) designed for both browser and Node.js environments. The current stable version is 3.0.1. This package provides a fast, general-purpose hash function primarily used for data structures like hash tables, probabilistic data structures (e.g., Bloom filters), and unique ID generation where high performance and low collision rates are essential, but cryptographic security is not required. Unlike some forks or alternative MurmurHash implementations, `murmurhash3js` directly accepts string inputs, abstracting away the need for explicit byte encoding by the user. The project has not seen active development or releases in over a decade, indicating an abandoned status.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install murmurhash3js"],"cli":null},"imports":["const murmurHash3 = require('murmurhash3js');","const hashValue = murmurHash3.x86.hash32('your string');","<script type=\"text/javascript\" src=\"murmurhash3js.min.js\"></script>\n<script>\n  const hash = murmurHash3.x86.hash32(\"hello\");\n</script>"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const murmurHash3 = require('murmurhash3js');\n\n// Hash a string to a 32-bit unsigned integer using x86 algorithm\nconst data32bit = \"I will not buy this record, it is scratched.\";\nconst hash32 = murmurHash3.x86.hash32(data32bit);\nconsole.log(`32-bit hash for \"${data32bit}\": ${hash32}`); // Example: 2832214938\n\n// Hash a string to a 128-bit hexadecimal string using x86 algorithm\nconst data128bitX86 = \"I will not buy this tobacconist's, it is scratched.\";\nconst hash128X86 = murmurHash3.x86.hash128(data128bitX86);\nconsole.log(`x86 128-bit hash for \"${data128bitX86}\": \"${hash128X86}\"`); // Example: \"9b5b7ba2ef3f7866889adeaf00f3f98e\"\n\n// Hash a string to a 128-bit hexadecimal string using x64 algorithm with a custom seed\nconst data128bitX64 = \"My hovercraft is full of eels.\";\nconst customSeed = 25;\nconst hash128X64 = murmurHash3.x64.hash128(data128bitX64, customSeed);\nconsole.log(`x64 128-bit hash for \"${data128bitX64}\" (seed ${customSeed}): \"${hash128X64}\"`); // Example: \"d30654abbd8227e367d73523f0079673\"\n\n// The .noConflict() method can be used in browser environments to reassign the global `murmurHash3` variable.\n// For Node.js, this method is generally not relevant as 'require' creates a local variable.","lang":"javascript","description":"This quickstart demonstrates how to use murmurhash3js in a Node.js environment to compute 32-bit and 128-bit hashes with both x86 and x64 algorithms, including the use of an optional seed value.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}