a good enough hash function

npm install okay-hash
1 downloads in the last week
4 downloads in the last month


A non-secure hash that's fast and simple. Hashes strings into signed numbers.

okhash('foo') // 101574

// hashes are consistent
okhash('foo') // 101574

// and are numeric
okhash('foo bar') // -682507847

// choose your own representation
okhash('foo bar').toString(32) // '-kasfi7'


With npm do

npm install okay-hash
npm loves you