@stryke/hash 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xx-hash.cjs +6 -6
- package/dist/xx-hash.mjs +1 -1
- package/package.json +2 -2
package/dist/xx-hash.cjs
CHANGED
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.xxHash64 = exports.xxHash32 = exports.xxHash128 = void 0;
|
|
7
7
|
var _jsXxhash = require("js-xxhash");
|
|
8
|
+
function r(t, i) {
|
|
9
|
+
let s = 0n;
|
|
10
|
+
for (let n = 0; n < i; n++) s = (s << 32n) + BigInt((0, _jsXxhash.xxHash32)(t, n));
|
|
11
|
+
return s;
|
|
12
|
+
}
|
|
8
13
|
const xxHash32 = t => (0, _jsXxhash.xxHash32)(t, 0),
|
|
9
14
|
xxHash64 = t => r(t, 2),
|
|
10
15
|
xxHash128 = t => r(t, 4);
|
|
11
16
|
exports.xxHash128 = xxHash128;
|
|
12
17
|
exports.xxHash64 = xxHash64;
|
|
13
|
-
exports.xxHash32 = xxHash32;
|
|
14
|
-
function r(t, i) {
|
|
15
|
-
let s = 0n;
|
|
16
|
-
for (let n = 0; n < i; n++) s = (s << 32n) + BigInt((0, _jsXxhash.xxHash32)(t, n));
|
|
17
|
-
return s;
|
|
18
|
-
}
|
|
18
|
+
exports.xxHash32 = xxHash32;
|
package/dist/xx-hash.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{xxHash32 as x}from"js-xxhash";
|
|
1
|
+
import{xxHash32 as x}from"js-xxhash";function r(t,i){let s=0n;for(let n=0;n<i;n++)s=(s<<32n)+BigInt(x(t,n));return s}export const xxHash32=t=>x(t,0),xxHash64=t=>r(t,2),xxHash128=t=>r(t,4);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/hash",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing utility functions that hash data using various algorithms.",
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"js-xxhash": "^4.0.0",
|
|
14
14
|
"ohash": "^2.0.11",
|
|
15
|
-
"@stryke/fs": "^0.
|
|
15
|
+
"@stryke/fs": "^0.20.5"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": { "access": "public" },
|
|
18
18
|
"devDependencies": {},
|