get-hash-code

Simple hashing algorithm based on .NET's String.GetHashCode

Usage no npm install needed!

<script type="module">
  import getHashCode from 'https://cdn.skypack.dev/get-hash-code';
</script>

README

GetHashCode()

A small hashing function for strings based on .NET's String.GetHashCode

Installation

npm install get-hash-code

Usage

The module is exported as a single function, which when called with a string argument returns the integer hash code:

var getHashCode = require('get-hash-code');
console.log(getHashCode("foo"));

Outputs:

1502598398