murmur-numbers
Simple fork of Gary Court's murmur3 implementation.
The only important difference is the inputs and outputs -
instead of hashing text into a 32-bit integer, this version takes a
series of integers, and divides the output into a float in the range
[0..1)
(i.e. same as Math.random
).
Installation:
npm install --save murmur-numbers
Usage:
var seed = 12345var hash = seed // 0.4604153847321868 // 0.585702647222206 // 0.8242928483523428 === // true