Package Exports
- fnv1a
- fnv1a/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fnv1a) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fnv1a
Simple and fast 32 bit FNV-1a hash for node.js based on this.
Usage
import { equal } from 'assert'
import hash from 'fnv1a'
const value = hash('node.js')
// decimal
equal(value, 3096844302)
// hexadecimal
equal(value.toString(16), 'b896180e')
// string
equal(value.toString(36), '1f7s4cu')
Note: importing via require()
is also supported.
Installation
npm install fnv1a