Socket
Book a DemoInstallSign in
Socket

@adeira/murmur-hash

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adeira/murmur-hash

Non-cryptographic hash function suitable for general hash-based lookup.

latest
npmnpm
Version
2.0.1
Version published
Weekly downloads
56
-44%
Maintainers
4
Weekly downloads
 
Created
Source

Modified MurmurHash algorithm returning base62 of murmur hash. This code was originally taken from Relay utils.

Read more about MurmurHash in this Stack Overflow question: MurmurHash - what is it?

Install

yarn add @adeira/murmur-hash

Optionally, install TS types (Flow types are included by default):

yarn add --dev @types/adeira__murmur-hash

Basic usage

import murmurHash from '@adeira/murmur-hash';

const data = { arg: { count: 20, start: 0, end: 5 } };
const hash = murmurHash(JSON.stringify(data));
console.log(hash); // 4gykY2

FAQs

Package last updated on 08 Oct 2021

Did you know?

Socket

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