short-hash
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/short-hash package

1.0.0 • Public • Published

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)

Name Type Description
str String The string to hash

Returns: String, a hexadecimal string.

License

MIT

/short-hash/

    Package Sidebar

    Install

    npm i short-hash

    Weekly Downloads

    12,502

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • joakimbeng