Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fast string hashing function for Node.JS.
branch: master

This branch is 4 commits behind darkskyapp:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
index.js
package.json
test.js

README.md

string-hash

A fast string hashing function for Node.JS. The particular algorithm is quite similar to djb2, by Dan Bernstein and available here. Differences include iterating over the string backwards (as that is faster in JavaScript) and using the XOR operator instead of the addition operator (as described at that page and because it obviates the need for modular arithmetic in JavaScript).

The hashing function returns a number between 0 and 4294967295 (inclusive).

Something went wrong with that request. Please try again.