@emotion/hash
Advanced tools
Comparing version 0.8.0 to 0.9.0
{ | ||
"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) | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
9487
2
14
207