Socket
Socket
Sign inDemoInstall

fnv1a

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fnv1a

Simple 32 bit FNV-1a hash algorithm implementation.


Version published
Weekly downloads
7K
decreased by-25.24%
Maintainers
1
Install size
4.98 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 03 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc