fnv1a

Simple 32 bit FNV-1a hash algorithm implementation.

Usage no npm install needed!

<script type="module">
  import fnv1a from 'https://cdn.skypack.dev/fnv1a';
</script>

README

view on npm npm module downloads per month Analytics

fnv1a

Simple and fast 32 bit FNV-1a hash for node.js based on this.

Usage


var assert = require('assert'), 
    hash   = require('fnv1a'),
    value  = hash('node.js')

// decimal

assert.equal(value, 3096844302)

// hexadecimal

assert.equal(value.toString(16), 'b896180e')

// string

assert.equal(value.toString(36), '1f7s4cu')

Installation

With npm:

npm install --save fnv1a

With git:

git clone git://github.com/schwarzkopfb/fnv1a.git

License

MIT license.