iidrak-analytics-react 1.2.9 → 1.3.0
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
CHANGED
|
@@ -19,7 +19,7 @@ This package relies on several peer dependencies for device info, storage, and s
|
|
|
19
19
|
npm install iidrak-analytics-react
|
|
20
20
|
|
|
21
21
|
# Install required peer dependencies
|
|
22
|
-
npm install
|
|
22
|
+
npm install react-native-mmkv react-native-nitro-modules @react-native-community/netinfo react-native-device-info react-native-view-shot react-native-safe-area-context
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
**iOS Users**: after installing, remember to run:
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { strf } from "./string.format.js";
|
|
4
|
-
import
|
|
4
|
+
import { createMMKV } from "react-native-mmkv";
|
|
5
|
+
const mmkvStorage = createMMKV();
|
|
6
|
+
const AsyncStorage = {
|
|
7
|
+
getItem: async (key) => mmkvStorage.getString(key) || null,
|
|
8
|
+
setItem: async (key, value) => { mmkvStorage.set(key, value); return Promise.resolve(); },
|
|
9
|
+
removeItem: async (key) => { mmkvStorage.delete(key); return Promise.resolve(); }
|
|
10
|
+
};
|
|
5
11
|
import NetInfo from "@react-native-community/netinfo";
|
|
6
12
|
|
|
7
13
|
strf();
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iidrak-analytics-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "react native client for metastreamio",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"
|
|
6
|
+
"react-native-mmkv": ">=4.0.0",
|
|
7
|
+
"react-native-nitro-modules": ">=0.30.0",
|
|
7
8
|
"@react-native-community/netinfo": ">=11.5.2",
|
|
8
9
|
"react": ">=18.0.0",
|
|
9
10
|
"react-native": ">=0.70.0",
|