{"id":10908,"library":"fmix","title":"MurmurHash3 Finalization Mix","description":"fmix is a JavaScript implementation of the MurmurHash3 x86 finalization mix function, a crucial step in the MurmurHash3 algorithm for generating high-quality hash values. The package provides a lightweight, single-purpose utility to apply this finalization step to a given 32-bit number. The current stable version is 1.0.0, released in July 2021. As a focused cryptographic utility, its release cadence is typically slow, with updates primarily addressing environmental compatibility or minor optimizations rather than new features, signifying a mature and stable API. It differentiates itself by offering only the finalization mix, allowing developers to integrate it into custom hashing implementations or use it alongside other MurmurHash3 components like `murmur-32` or `murmur-128` (from the same author) where modularity is desired, rather than a full end-to-end hashing solution. This allows for fine-grained control over the hashing process. The library is dependency-free, ensuring a minimal footprint.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/LinusU/fmix","tags":["javascript"],"install":[{"cmd":"npm install fmix","lang":"bash","label":"npm"},{"cmd":"yarn add fmix","lang":"bash","label":"yarn"},{"cmd":"pnpm add fmix","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Since v1.0.0, this package is ESM-only and must be imported using native ES module syntax. CommonJS `require()` is no longer supported.","wrong":"const fmix = require('fmix')","symbol":"fmix","correct":"import fmix from 'fmix'"}],"quickstart":{"code":"import fmix from 'fmix';\n\n// The fmix function applies the finalization steps of MurmurHash3\n// to an input number, enhancing its distribution and mixing properties.\n// This is typically the last step after all input data has been processed\n// into a single 32-bit hash state.\n\nconst initialHashState = 0xdeadbeef; // Example 32-bit number (hexadecimal)\nconst finalHash = fmix(initialHashState);\n\nconsole.log(`Initial hash state: 0x${initialHashState.toString(16)}`);\nconsole.log(`Finalization mix result: ${finalHash}`);\nconsole.log(`Finalization mix result (hex): 0x${finalHash.toString(16)}`);\n\n// Example with a different input\nconst anotherState = 0x12345678;\nconst anotherFinalHash = fmix(anotherState);\nconsole.log(`\\nAnother state: 0x${anotherState.toString(16)}`);\nconsole.log(`Another finalization mix result: ${anotherFinalHash}`);\n\n// Illustrating the deterministic nature\nconst sameState = 0xdeadbeef;\nconst retryFinalHash = fmix(sameState);\nconsole.log(`\\nRe-applying to 0x${sameState.toString(16)}: ${retryFinalHash}`);","lang":"javascript","description":"Demonstrates how to install `fmix` and compute the finalization mix for a given 32-bit number, showing its deterministic output."},"warnings":[{"fix":"Migrate all `require()` statements to `import` statements (e.g., `import fmix from 'fmix'`) and ensure your project environment supports ESM.","message":"The package converted from CommonJS to ECMAScript Modules (ESM) in v1.0.0.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Ensure your Node.js environment is `^12.20.0`, `^14.13.1`, or `>=16.0.0` or newer to use `fmix@1.0.0` and above.","message":"Support for older Node.js versions was dropped in v1.0.0.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'-128':120 '-32':117 '1.0.0':55 '2021':59 '32':47 'address':74 'algorithm':22 'allow':99,140 'alongsid':111 'api':89 'appli':40 'author':124 'bit':48 'cadenc':67 'compat':76 'compon':114 'control':145 'crucial':17 'cryptograph':63 'current':51 'custom':105 'depend':154 'dependency-fre':153 'desir':128 'develop':100 'differenti':91 'end':134,136 'end-to-end':133 'ensur':156 'environment':75 'featur':83 'final':2,13,42,97 'fine':143 'fine-grain':142 'fmix':4 'focus':62 'footprint':159 'free':155 'full':132 'function':15 'generat':24 'given':46 'grain':144 'hash':28,106,137,148 'high':26 'high-qual':25 'implement':8,107 'integr':102 'javascript':7,160 'juli':58 'librari':151 'lightweight':34 'like':115 'matur':86 'minim':158 'minor':78 'mix':3,14,98 'modular':126 'murmur':116,119 'murmurhash3':1,11,21,113 'new':82 'number':49 'offer':94 'optim':79 'packag':31 'primarili':73 'process':149 'provid':32 'purpos':37 'qualiti':27 'rather':80,129 'releas':56,66 'signifi':84 'singl':36 'single-purpos':35 'slow':70 'solut':138 'stabl':52,88 'step':18,43 'typic':69 'updat':72 'use':109 'util':38,64 'valu':29 'version':53 'x86':12","created_at":"2026-04-19T13:35:14.941678+00:00","updated_at":"2026-04-19T13:35:14.941678+00:00","problems":[{"fix":"Change `const fmix = require('fmix');` to `import fmix from 'fmix';` in your JavaScript or TypeScript files. Ensure your environment is configured for ESM.","cause":"Attempting to import the `fmix` package using CommonJS `require()` syntax when the package is ESM-only.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module ... fmix/index.js from ... not supported."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.2.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/LinusU/fmix","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fmix","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}