New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hydra

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydra - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

20

lib/utils.js

@@ -54,4 +54,24 @@ 'use strict';

/**
* @name stringHash
* @summary returns a hash value for a supplied string
* @see https://github.com/darkskyapp/string-hash
* @private
* @param {object} str - string to hash
* @return {number} hash - hash value
*/
static stringHash(str) {
let hash = 5381;
let i = str.length;
while (i) {
hash = (hash * 33) ^ str.charCodeAt(--i);
}
/* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
* integers. Since we want the results to be always positive, convert the
* signed int to an unsigned by doing an unsigned bitshift. */
return hash >>> 0;
}
}
module.exports = Utils;

2

package.json
{
"name": "hydra",
"version": "1.2.6",
"version": "1.2.7",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "Carlos Justiniano",

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