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

1.1.1 • Public • Published

view on npm npm module downloads per month node version license

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

License

MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    7,635
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    7,635
  • 1.1.0
    0
  • 1.0.1
    751
  • 1.0.0
    0

Package Sidebar

Install

npm i fnv1a

Weekly Downloads

6,926

Version

1.1.1

License

MIT

Unpacked Size

4.34 kB

Total Files

5

Last publish

Collaborators

  • schwarzkopfb