djb2a
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

djb2a

DJB2a non-cryptographic hash function

DJB2a has good distribution and collisions are rare.

Install

$ npm install djb2a

Usage

import djb2a from 'djb2a';

djb2a('🦄🌈');
//=> 1484783307

It returns the hash as a positive integer.

Related

  • fnv1a - FNV-1a non-cryptographic hash function
  • sdbm - SDBM non-cryptographic hash function

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    158
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    158
  • 1.2.0
    79,300
  • 1.1.0
    1
  • 1.0.0
    2

Package Sidebar

Install

npm i djb2a

Weekly Downloads

79,461

Version

2.0.0

License

MIT

Unpacked Size

3.14 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus