MurmurHash2 implementation with support for Unicode
npm install murmurhash2MurmurHash2 x86 32-bit implemented in TypeScript, with support for Unicode characters.
``bash`
npm install murmurhash2
`typescript
import { murmur2 } from 'murmurhash2';
murmur2('Hi there 👋', 12345);
`
Install nodejs and yarn, then:
`bash`
yarn
yarn run build
The repository contains a couple of sanity tests.
To run the tests:
`bash`
yarn run test
This implementation is largely inspired by the one from Gary Court: https://github.com/garycourt/murmurhash-js
It uses a TextEncoder to encode the input string as a Uint8Array` buffer before performing the calculation.
- MurmurHash2 by Austin Appleby
- Inspired by: https://github.com/garycourt/murmurhash-js
- xtensor-stack/xtl implentation