Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

murmurhash

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

murmurhash - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

.github/FUNDING.yml

14

murmurhash.js
(function(){
var _global = this;
const createBuffer =
Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow
? Buffer.from
: // support for Node < 5.10
val => new Buffer(val);
const createBuffer = (val) => new TextEncoder().encode(val)

@@ -18,3 +14,3 @@ /**

*
* @param {Buffer} str ASCII only
* @param {Uint8Array | string} str ASCII only
* @param {number} seed Positive integer only

@@ -24,3 +20,3 @@ * @return {number} 32-bit positive integer hash

function MurmurHashV2(str, seed) {
if (!Buffer.isBuffer(str)) str = createBuffer(str);
if (typeof str === 'string') str = createBuffer(str);
var

@@ -71,3 +67,3 @@ l = str.length,

*
* @param {Buffer} key ASCII only
* @param {Uint8Array | string} key ASCII only
* @param {number} seed Positive integer only

@@ -77,3 +73,3 @@ * @return {number} 32-bit positive integer hash

function MurmurHashV3(key, seed) {
if (!Buffer.isBuffer(key)) key = createBuffer(key);
if (typeof key === 'string') key = createBuffer(key);

@@ -80,0 +76,0 @@ var remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;

{
"name" : "murmurhash",
"version" : "1.0.0",
"version" : "2.0.0",
"description" : "A Node.js module for the optimized JavaScript implementation of the MurmurHash algorithms.",

@@ -5,0 +5,0 @@ "author": {

@@ -22,2 +22,4 @@ # node-murmurhash

To support older browsers you need to use TextEncoder [polyfill](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder#Polyfill)
or in node.js

@@ -24,0 +26,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc