@emotion/hash
Advanced tools
Comparing version 0.6.6 to 0.7.0
'use strict'; | ||
/* eslint-disable */ | ||
// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js | ||
function murmurhash2_32_gc(str) { | ||
var l = str.length, | ||
h = l ^ l, | ||
i = 0, | ||
k; | ||
while (l >= 4) { | ||
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; | ||
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); | ||
k ^= k >>> 24; | ||
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); | ||
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k; | ||
l -= 4; | ||
++i; | ||
} | ||
switch (l) { | ||
case 3: | ||
h ^= (str.charCodeAt(i + 2) & 0xff) << 16; | ||
case 2: | ||
h ^= (str.charCodeAt(i + 1) & 0xff) << 8; | ||
case 1: | ||
h ^= str.charCodeAt(i) & 0xff; | ||
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); | ||
} | ||
h ^= h >>> 13; | ||
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); | ||
h ^= h >>> 15; | ||
return (h >>> 0).toString(36); | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./hash.cjs.prod.js'); | ||
} else { | ||
module.exports = require('./hash.cjs.dev.js'); | ||
} | ||
module.exports = murmurhash2_32_gc; |
{ | ||
"name": "@emotion/hash", | ||
"version": "0.6.6", | ||
"version": "0.7.0", | ||
"description": "A MurmurHash2 implementation", | ||
@@ -8,3 +8,3 @@ "main": "dist/hash.cjs.js", | ||
"license": "MIT", | ||
"repository": "https://github.com/emotion-js/emotion/tree/master/next-packages/hash", | ||
"repository": "https://github.com/emotion-js/emotion/tree/master/packages/hash", | ||
"publishConfig": { | ||
@@ -18,3 +18,6 @@ "access": "public" | ||
"umd:main": "./dist/index.min.js", | ||
"gitHead": "94fed7652759a0f1962da66b922299398e39fe4d" | ||
"browser": { | ||
"./dist/hash.cjs.js": "./dist/hash.browser.cjs.js", | ||
"./dist/hash.esm.js": "./dist/hash.browser.esm.js" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
10893
12
217
2