{"id":15697435,"url":"https://github.com/jonahsnider/murmurhash-wasm","last_synced_at":"2025-04-19T12:40:13.370Z","repository":{"id":37564724,"uuid":"446082731","full_name":"jonahsnider/murmurhash-wasm","owner":"jonahsnider","description":"MurmurHash in WASM for Node.js and the browser","archived":false,"fork":false,"pushed_at":"2025-04-17T12:48:10.000Z","size":15076,"stargazers_count":7,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T21:21:03.867Z","etag":null,"topics":["assemblyscript","hashing","hashing-algorithm","murmurhash","murmurhash3","node","typescript","wasm"],"latest_commit_sha":null,"homepage":"https://murmurhash-wasm.jonah.pw/","language":"WebAssembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonahsnider.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["jonahsnider"],"patreon":"jonahsnider","open_collective":null,"ko_fi":"jonahsnider","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-01-09T12:32:30.000Z","updated_at":"2025-04-17T06:50:30.000Z","dependencies_parsed_at":"2023-12-19T07:09:28.112Z","dependency_job_id":"7badc09b-9a02-4ee3-b7e1-bb3d03124e9f","html_url":"https://github.com/jonahsnider/murmurhash-wasm","commit_stats":{"total_commits":418,"total_committers":3,"mean_commits":"139.33333333333334","dds":"0.11961722488038273","last_synced_commit":"d1093bd0cfb6c86d02df572fc441a12d1e0a149a"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":"jonahsnider/typescript-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonahsnider%2Fmurmurhash-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonahsnider%2Fmurmurhash-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonahsnider%2Fmurmurhash-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonahsnider%2Fmurmurhash-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonahsnider","download_url":"https://codeload.github.com/jonahsnider/murmurhash-wasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249695886,"owners_count":21311789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assemblyscript","hashing","hashing-algorithm","murmurhash","murmurhash3","node","typescript","wasm"],"created_at":"2024-10-03T19:19:38.932Z","updated_at":"2025-04-19T12:40:13.338Z","avatar_url":"https://github.com/jonahsnider.png","language":"WebAssembly","funding_links":["https://github.com/sponsors/jonahsnider","https://patreon.com/jonahsnider","https://ko-fi.com/jonahsnider"],"categories":[],"sub_categories":[],"readme":"# MurmurHash WASM\n\n[![Build Status](https://github.com/jonahsnider/murmurhash-wasm/workflows/CI/badge.svg)](https://github.com/jonahsnider/murmurhash-wasm/actions)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)\n[![codecov](https://codecov.io/gh/jonahsnider/murmurhash-wasm/branch/main/graph/badge.svg)](https://codecov.io/jonahsnider/murmurhash-wasm)\n\nMurmurHash in WASM for Node.js and the browser.\n\nGenerated documentation is here: \u003chttps://murmurhash-wasm.jonah.pw\u003e.\n\nThe WASM is inlined into the JS file to prevent issues from loading the module.\n\n## Usage\n\n### MurmurHash3\n\n#### 32-bit hash\n\nHashes a provided key with a seed using the MurmurHash3 algorithm yielding a 32-bit hash.\n\nRefer to [the documentation](https://murmurhash-wasm.jonah.pw/modules/murmurhash3#hash32) for more info.\n\n```js\nimport {MurmurHash3} from 'murmurhash-wasm';\n\nconst key = 'hello';\nconst seed = 0;\n\nconst hash = MurmurHash3.hash32(key, seed);\n\nconst hex = hash.toString('hex');\n// '5844da46'\nconst value = hash.readUInt32BE();\n// 1480907334\n```\n\n## Installation\n\n```sh\nnpm install murmurhash-wasm\n# or\nyarn add murmurhash-wasm\n```\n\n### Browsers\n\nWhen running in the browser the global `Buffer` object will be used when available.\nIf it's not defined the library will use [feross/buffer](https://github.com/feross/buffer) as a fallback ([a ponyfill](https://ponyfill.com/)).\n\nThe global `Buffer` will never be modified or globally polyfilled.\n\n## Benchmarks\n\nSome benchmarks for the library are available in the `benchmark/` directory of the source.\nSee [`contributing.md`](contributing.md) for info on how to run them yourself.\n\nThe results on my MacBook Pro (16-inch, 2019) are shown below:\n\n```text\ncrypto\n--\u003e MD5: 681,199ops/sec\n--\u003e SHA-1: 681,663ops/sec\nmurmurhash-wasm\n--\u003e MurmurHash3 32-bit: 793,651ops/sec\n```\n\nAs you can see, this library performs slightly better than the native `crypto` MD5 and SHA-1 hash function implementations.\n\nIt's important to mention that the MurmurHash variants are not cryptographic hash functions like SHA-1 and MD5 were originally designed to be.\nComparing them isn't done to say \"this library is a faster alternative than MD5 and SHA-1\", but rather \"here's how this library compares to similar hashing solutions\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonahsnider%2Fmurmurhash-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonahsnider%2Fmurmurhash-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonahsnider%2Fmurmurhash-wasm/lists"}