Socket
Socket
Sign inDemoInstall

short-hash

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    short-hash

Get a short hash from a string. Uses Bernstein's popular 'times 33' hash algorithm but returns a hex string instead of a number


Version published
Weekly downloads
9.5K
decreased by-24.05%
Maintainers
1
Install size
7.00 kB
Created
Weekly downloads
 

Readme

Source

short-hash

NPM version js-xo-style

Get a short hash from a string. Uses Bernstein's popular "times 33" hash algorithm but returns a hex string instead of a number

This is just a convenient wrapper around hash-string.

Installation

Install short-hash using npm:

npm install --save short-hash

Usage

Module usage

var shortHash = require('short-hash');

shortHash('a string to hash...');

API

shortHash(str)

NameTypeDescription
strStringThe string to hash

Returns: String, a hexadecimal string.

License

MIT

FAQs

Last updated on 26 Aug 2015

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