react-native-xxhash 0.1.1 → 0.1.3
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/README.md +4 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/package.json +13 -32
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -41
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- /package/lib/{typescript/commonjs → commonjs}/package.json +0 -0
- /package/lib/{typescript/module → module}/package.json +0 -0
- /package/lib/typescript/{commonjs/src/index.d.ts → index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,IAAI,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAcD;;;;;;;;;;;;;;;;GAgBG;AACF,eAAO,MAAM,OAAO,UAAW,MAAM,KAAG,MAUvC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AAEF,eAAO,MAAM,MAAM,UAAW,MAAM,KAAG,MAUtC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-xxhash",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
5
|
-
"source": "./src/index.tsx",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Fast xxHash implementation for React Native",
|
|
6
5
|
"main": "./lib/commonjs/index.js",
|
|
7
6
|
"module": "./lib/module/index.js",
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"types": "./lib/typescript/module/src/index.d.ts",
|
|
12
|
-
"default": "./lib/module/index.js"
|
|
13
|
-
},
|
|
14
|
-
"require": {
|
|
15
|
-
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
16
|
-
"default": "./lib/commonjs/index.js"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
7
|
+
"types": "lib/typescript/index.d.ts",
|
|
8
|
+
"react-native": "src/index",
|
|
9
|
+
"source": "./src/index",
|
|
20
10
|
"files": [
|
|
21
11
|
"src",
|
|
22
12
|
"lib",
|
|
@@ -50,7 +40,8 @@
|
|
|
50
40
|
"ios",
|
|
51
41
|
"android",
|
|
52
42
|
"xxhash",
|
|
53
|
-
"hash"
|
|
43
|
+
"hash",
|
|
44
|
+
"fast"
|
|
54
45
|
],
|
|
55
46
|
"repository": {
|
|
56
47
|
"type": "git",
|
|
@@ -75,6 +66,8 @@
|
|
|
75
66
|
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
76
67
|
"@types/jest": "^29.5.5",
|
|
77
68
|
"@types/react": "^18.2.44",
|
|
69
|
+
"@types/react-native": "^0.65.5",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
78
71
|
"commitlint": "^17.0.2",
|
|
79
72
|
"del-cli": "^5.1.0",
|
|
80
73
|
"eslint": "^8.51.0",
|
|
@@ -86,8 +79,7 @@
|
|
|
86
79
|
"react-native": "0.76.6",
|
|
87
80
|
"react-native-builder-bob": "^0.35.2",
|
|
88
81
|
"release-it": "^17.10.0",
|
|
89
|
-
"
|
|
90
|
-
"typescript": "^5.2.2"
|
|
82
|
+
"typescript": "5.0.4"
|
|
91
83
|
},
|
|
92
84
|
"resolutions": {
|
|
93
85
|
"@types/react": "^18.2.44"
|
|
@@ -164,23 +156,12 @@
|
|
|
164
156
|
"source": "src",
|
|
165
157
|
"output": "lib",
|
|
166
158
|
"targets": [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
{
|
|
170
|
-
"esm": true
|
|
171
|
-
}
|
|
172
|
-
],
|
|
173
|
-
[
|
|
174
|
-
"module",
|
|
175
|
-
{
|
|
176
|
-
"esm": true
|
|
177
|
-
}
|
|
178
|
-
],
|
|
159
|
+
"commonjs",
|
|
160
|
+
"module",
|
|
179
161
|
[
|
|
180
162
|
"typescript",
|
|
181
163
|
{
|
|
182
|
-
"project": "tsconfig.build.json"
|
|
183
|
-
"esm": true
|
|
164
|
+
"project": "tsconfig.build.json"
|
|
184
165
|
}
|
|
185
166
|
]
|
|
186
167
|
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,IAAI,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAcD;;;;;;;;;;;;;;;;GAgBG;AACF,eAAO,MAAM,OAAO,UAAW,MAAM,KAAG,MAUvC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AAEF,eAAO,MAAM,MAAM,UAAW,MAAM,KAAG,MAUtC,CAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var __xxhash128: (input: string) => string;
|
|
3
|
-
var __xxhash64: (input: string) => string;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Hashes the input string using the xxhash128 algorithm.
|
|
7
|
-
* This function provides a fast and deterministic 128-bit hash for a given string input.
|
|
8
|
-
*
|
|
9
|
-
* @param {string} input - The string to hash.
|
|
10
|
-
* @returns {string} The hashed string as a hexadecimal representation of the 128-bit hash.
|
|
11
|
-
* @throws {Error} If the input is not provided.
|
|
12
|
-
* @throws {Error} If the input is not of type string.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const result = hash128("hello world");
|
|
16
|
-
* console.log(result); // Example output: "3a2b9e6a2b5e7e5a9e6a2b5e7e5a2a2"
|
|
17
|
-
*
|
|
18
|
-
* @description
|
|
19
|
-
* This function uses the xxhash128 algorithm, which provides a larger hash size (128-bit) compared to xxhash64.
|
|
20
|
-
* It is ideal for scenarios where a reduced collision risk is critical, such as in distributed systems or when hashing larger datasets.
|
|
21
|
-
*/
|
|
22
|
-
export declare const hash128: (input: string) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Hashes the input string using the xxhash64 algorithm.
|
|
25
|
-
* This function provides a fast and deterministic 64-bit hash for a given string input.
|
|
26
|
-
*
|
|
27
|
-
* @param {string} input - The string to hash.
|
|
28
|
-
* @returns {string} The hashed string as a hexadecimal representation of the 64-bit hash.
|
|
29
|
-
* @throws {Error} If the input is not provided.
|
|
30
|
-
* @throws {Error} If the input is not of type string.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* const result = hash64("hello world");
|
|
34
|
-
* console.log(result); // Example output: "9e6a2b5e7e5a2a2e"
|
|
35
|
-
*
|
|
36
|
-
* @description
|
|
37
|
-
* This function uses the xxhash64 algorithm, known for its high performance and low collision rate.
|
|
38
|
-
* It is ideal for hashing small to medium-sized strings.
|
|
39
|
-
*/
|
|
40
|
-
export declare const hash64: (input: string) => string;
|
|
41
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,IAAI,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAcD;;;;;;;;;;;;;;;;GAgBG;AACF,eAAO,MAAM,OAAO,UAAW,MAAM,KAAG,MAUvC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AAEF,eAAO,MAAM,MAAM,UAAW,MAAM,KAAG,MAUtC,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|