1.0.0
TypeScript implementation of Murmur Hash 3.
Repository
Current version released
3 years ago
Versions
murmur_hash_3
A TypeScript implementation of unsigned 32-bit MurmurHash3.
Usage
murmurHash3
This function provides the MurmurHash3 value for a string key.
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { murmurHash3 } from "https://deno.land/x/murmur_hash_3/mod.ts";
const hash = murmurHash3("deno");
assertEquals(hash, 3565573943);
A seed can be provided with the options parameter. The default seed is 0.
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { murmurHash3 } from "https://deno.land/x/murmur_hash_3/mod.ts";
const hash = murmurHash3("deno", { seed: 42 });
assertEquals(hash, 3140446342);
Contributing
Feel free to contribute.