@applicaster/zapp-react-native-utils 13.0.0-rc.90 → 13.0.0-rc.91
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/functionUtils/index.ts +25 -0
- package/index.d.ts +0 -12
- package/package.json +2 -2
package/functionUtils/index.ts
CHANGED
|
@@ -258,3 +258,28 @@ export const extractDataFromProperty = (property, data): any =>
|
|
|
258
258
|
);
|
|
259
259
|
|
|
260
260
|
export const then = (fn) => (promise) => promise.then(fn);
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Returns a replacer function for JSON.stringify that handles circular references,
|
|
264
|
+
* functions, and React context objects
|
|
265
|
+
* @returns {Function} A replacer function that detects and handles circular references,
|
|
266
|
+
* functions, and React context objects
|
|
267
|
+
*/
|
|
268
|
+
export const getJsonReplacer = () => {
|
|
269
|
+
return (_key, value) => {
|
|
270
|
+
if (typeof value === "function") {
|
|
271
|
+
return "[Function]";
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (
|
|
275
|
+
typeof value === "object" &&
|
|
276
|
+
value !== null &&
|
|
277
|
+
value.Provider &&
|
|
278
|
+
value.Consumer
|
|
279
|
+
) {
|
|
280
|
+
return "[ReactContext]";
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return value;
|
|
284
|
+
};
|
|
285
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -105,18 +105,6 @@ declare type NavBarState = {
|
|
|
105
105
|
title: string;
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
declare type StorageValuesToAdd = Record<string, NamespaceValues>;
|
|
109
|
-
|
|
110
|
-
declare type StorageValuesToRemove = {
|
|
111
|
-
string?: string[];
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
declare type StorageOwnedValues = {
|
|
115
|
-
string?: string[];
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
declare type NamespaceValues = Record<string, string>;
|
|
119
|
-
|
|
120
108
|
declare type RefreshProps = {
|
|
121
109
|
forceRefresh?: boolean;
|
|
122
110
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "13.0.0-rc.
|
|
3
|
+
"version": "13.0.0-rc.91",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@applicaster/applicaster-types": "13.0.0-rc.
|
|
30
|
+
"@applicaster/applicaster-types": "13.0.0-rc.91",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|