Socket
Socket
Sign inDemoInstall

@emotion/hash

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/hash - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

dist/declarations/src/index.d.ts

22

package.json
{
"name": "@emotion/hash",
"version": "0.8.0",
"version": "0.9.0",
"description": "A MurmurHash2 implementation",
"main": "dist/hash.cjs.js",
"module": "dist/hash.esm.js",
"main": "dist/emotion-hash.cjs.js",
"module": "dist/emotion-hash.esm.js",
"types": "types/index.d.ts",
"license": "MIT",
"repository": "https://github.com/emotion-js/emotion/tree/master/packages/hash",
"repository": "https://github.com/emotion-js/emotion/tree/main/packages/hash",
"publishConfig": {

@@ -16,3 +16,3 @@ "access": "public"

"dist",
"types"
"types/*.d.ts"
],

@@ -23,8 +23,12 @@ "scripts": {

"devDependencies": {
"dtslint": "^0.3.0"
"@definitelytyped/dtslint": "0.0.112",
"typescript": "^4.5.5"
},
"browser": {
"./dist/hash.cjs.js": "./dist/hash.browser.cjs.js",
"./dist/hash.esm.js": "./dist/hash.browser.esm.js"
"exports": {
".": {
"module": "./dist/emotion-hash.esm.js",
"default": "./dist/emotion-hash.cjs.js"
},
"./package.json": "./package.json"
}
}

@@ -15,3 +15,3 @@ // @flow

var h = 0;
var h = 0

@@ -22,3 +22,3 @@ // Mix 4 bytes at a time into the hash

i = 0,
len = str.length;
len = str.length
for (; len >= 4; ++i, len -= 4) {

@@ -29,8 +29,8 @@ k =

((str.charCodeAt(++i) & 0xff) << 16) |
((str.charCodeAt(++i) & 0xff) << 24);
((str.charCodeAt(++i) & 0xff) << 24)
k =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0xe995) << 16);
k ^= /* k >>> r: */ k >>> 24;
(k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0xe995) << 16)
k ^= /* k >>> r: */ k >>> 24

@@ -41,3 +41,3 @@ h =

/* Math.imul(h, m): */
((h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16));
((h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16))
}

@@ -49,10 +49,10 @@

case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
h ^= (str.charCodeAt(i + 2) & 0xff) << 16
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
h ^= (str.charCodeAt(i + 1) & 0xff) << 8
case 1:
h ^= str.charCodeAt(i) & 0xff;
h ^= str.charCodeAt(i) & 0xff
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16);
(h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16)
}

@@ -63,8 +63,8 @@

h ^= h >>> 13;
h ^= h >>> 13
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16);
(h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16)
return ((h ^ (h >>> 15)) >>> 0).toString(36);
return ((h ^ (h >>> 15)) >>> 0).toString(36)
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc