string-hash
fast string hashing function
Last updated 8 years ago by darkskyapp .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install string-hash 
SYNC missed versions from official npm registry.

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).

Thanks to cscott for reminding us how integers work in JavaScript.

License

To the extend possible by law, The Dark Sky Company, LLC has waived all copyright and related or neighboring rights to this library.

Current Tags

  • 1.1.3                                ...           latest (8 years ago)

4 Versions

  • 1.1.3                                ...           8 years ago
  • 1.1.2                                ...           8 years ago
  • 1.1.1                                ...           8 years ago
  • 1.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 6
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE