jumphash
Javascript implementation of jump consistent hash
For a faster node module see jumpsuit
Example
var jumphash = // jumphash(key, numBuckets) // number keys - uses the floor of the absolute valueconsole // 2 // buffer keys - uses the first 8 bytes as the keyconsole // 888 // string keys - hashes the string with sha1console // 9 // optionally, specify a different string hash algorithmconsole // 82