@statsig/react-native-core 2.2.0-beta.1 → 2.2.0-beta.2
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/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/react-native-core",
|
|
3
|
-
"version": "2.2.0-beta.
|
|
3
|
+
"version": "2.2.0-beta.2",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@statsig/client-core": "2.2.0-beta.
|
|
6
|
-
"@statsig/js-client": "2.2.0-beta.
|
|
7
|
-
"@statsig/react-bindings": "2.2.0-beta.
|
|
5
|
+
"@statsig/client-core": "2.2.0-beta.2",
|
|
6
|
+
"@statsig/js-client": "2.2.0-beta.2",
|
|
7
|
+
"@statsig/react-bindings": "2.2.0-beta.2"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"react-native": "0.*",
|
|
@@ -15,7 +15,7 @@ const client_core_1 = require("@statsig/client-core");
|
|
|
15
15
|
function _createPreloadedAsyncStorage() {
|
|
16
16
|
const inMemoryStore = {};
|
|
17
17
|
const provider = {
|
|
18
|
-
_isProviderReady: _prefetchFromAsyncStorage(inMemoryStore),
|
|
18
|
+
_isProviderReady: () => _prefetchFromAsyncStorage(inMemoryStore),
|
|
19
19
|
_getProviderName: function () {
|
|
20
20
|
return 'AsyncStorage';
|
|
21
21
|
},
|
|
@@ -41,7 +41,7 @@ exports._createPreloadedAsyncStorage = _createPreloadedAsyncStorage;
|
|
|
41
41
|
function _prefetchFromAsyncStorage(inMemoryStore) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
const keys = yield async_storage_1.default.getAllKeys();
|
|
44
|
-
|
|
44
|
+
return Promise.all(keys.map((key) => __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
if (!key.startsWith('statsig.')) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
@@ -50,6 +50,6 @@ function _prefetchFromAsyncStorage(inMemoryStore) {
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
inMemoryStore[key] = cache;
|
|
53
|
-
})));
|
|
53
|
+
}))).then(() => { });
|
|
54
54
|
});
|
|
55
55
|
}
|