{"id":15941342,"url":"https://github.com/justjavac/deno-murmurhash","last_synced_at":"2026-04-26T12:32:23.917Z","repository":{"id":57675396,"uuid":"226366601","full_name":"justjavac/deno-murmurhash","owner":"justjavac","description":"An incremental implementation of MurmurHash3 for JavaScript","archived":false,"fork":false,"pushed_at":"2020-09-05T16:53:49.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-15T18:58:40.089Z","etag":null,"topics":["deno","deno-mod","deno-module","deno-modules"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justjavac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-06T16:17:08.000Z","updated_at":"2025-05-05T08:18:13.000Z","dependencies_parsed_at":"2022-09-26T18:11:15.675Z","dependency_job_id":null,"html_url":"https://github.com/justjavac/deno-murmurhash","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/justjavac/deno-murmurhash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno-murmurhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno-murmurhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno-murmurhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno-murmurhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justjavac","download_url":"https://codeload.github.com/justjavac/deno-murmurhash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno-murmurhash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32297893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deno","deno-mod","deno-module","deno-modules"],"created_at":"2024-10-07T07:03:17.520Z","updated_at":"2026-04-26T12:32:23.902Z","avatar_url":"https://github.com/justjavac.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno-murmurhash\n\n[![tag](https://img.shields.io/github/release/justjavac/deno-murmurhash)](https://github.com/justjavac/deno-murmurhash/releases)\n[![Build Status](https://github.com/justjavac/deno-murmurhash/workflows/ci/badge.svg?branch=master)](https://github.com/justjavac/deno-murmurhash/actions)\n[![license](https://img.shields.io/github/license/justjavac/deno-murmurhash)](https://github.com/justjavac/deno-murmurhash/blob/master/LICENSE)\n[![](https://img.shields.io/badge/deno-v1.3-green.svg)](https://github.com/denoland/deno)\n\n\u003e An incremental implementation of MurmurHash3 for JavaScript\n\nThis version works significantly faster than the non-incremental version if you\nneed to hash many small strings into a single hash,\nsince string concatenation (to build the single string to pass the non-incremental version)\nis fairly costly.\n\nIn one case tested, using the incremental version was about 50% faster\nthan concatenating 5-10 strings and then hashing.\n\n## Usage\n\n```ts\nimport Murmurhash3 from \"https://deno.land/x/murmurhash/mod.ts\";\n\nconst hash = MurmurHash3(\"string\");\n\n// Incrementally add text\nhash.hash(\"more strings\");\nhash.hash(\"even more strings\");\n\n// All calls can be chained if desired\nhash\n  .hash(\"and\")\n  .hash(\"some\")\n  .hash(\"more\");\n\n// Get a result\nhash.result();\n// returns 0xe4ccfe6b\n```\n\n## API\n\n### MurmurHash3(key?: string, seed?: number)\n\nGet a hash state object, optionally initialized with the given `key` and `seed`.\n`seed` must be a positive integer if provided.\n\n```ts\nconst hashState = new MurmurHash3();\n```\n\n### MurmurHash3.prototype.hash(key: string)\n\nIncrementally add `key` to the hash.\nThis can be called as many times as you want for the hash state object,\nincluding after a call to `result()`.\n\n### MurmurHash3.prototype.result(): number\n\nGet the result of the hash as a 32-bit positive integer.\nThis performs the tail and finalizer portions of the algorithm,\nbut does not store the result in the state object.\n\nThis means that it is perfectly safe to get results and then continue adding strings via `hash`.\n\n```ts\n// Do the whole string at once\nnew MurmurHash3(\"this is a test string\").result();\n// 0x70529328\n\n// Do part of the string, get a result, then the other part\nconst m = MurmurHash3(\"this is a\");\nm.result();\n// 0xbfc4f834\nm.hash(\" test string\").result();\n// 0x70529328 (same as above)\n```\n\n### MurmurHash3.prototype.reset(seed: number)\n\nReset the state object for reuse, optionally using the given `seed`\n(defaultsto `0` like the constructor).\n\n## Thanks\n\nHeavily inspired by [garycourt/murmurhash-js](https://github.com/garycourt/murmurhash-js),\n[kazuyukitanimura/murmurhash-js](https://github.com/kazuyukitanimura/murmurhash-js),\n[jensyt/imurmurhash-js](https://github.com/jensyt/imurmurhash-js).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustjavac%2Fdeno-murmurhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustjavac%2Fdeno-murmurhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustjavac%2Fdeno-murmurhash/lists"}