@applicaster/zapp-react-native-utils 14.0.0-alpha.5594607030 → 14.0.0-alpha.5974411329

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.
@@ -1,5 +1,6 @@
1
1
  import { ContextKeysManager } from "./index";
2
2
  import * as R from "ramda";
3
+ import * as _ from "lodash";
3
4
 
4
5
  export interface IResolver {
5
6
  resolve: (string) => Promise<string | number | object>;
@@ -77,3 +78,19 @@ export const resolveObjectValues = async (
77
78
 
78
79
  return Object.fromEntries(resolvedEntries);
79
80
  };
81
+
82
+ export const extractAtValues = _.memoize((input: any): string[] => {
83
+ return _.flatMapDeep(input, (value: any) => {
84
+ if (_.isString(value)) {
85
+ const matches = value.match(/@\{([^}]*)\}/g);
86
+
87
+ return matches ? matches.map((match) => match.slice(2, -1)) : [];
88
+ }
89
+
90
+ if (_.isObject(value)) {
91
+ return extractAtValues(_.values(value));
92
+ }
93
+
94
+ return [];
95
+ });
96
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "14.0.0-alpha.5594607030",
3
+ "version": "14.0.0-alpha.5974411329",
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": "14.0.0-alpha.5594607030",
30
+ "@applicaster/applicaster-types": "14.0.0-alpha.5974411329",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",
@@ -38,7 +38,6 @@
38
38
  "peerDependencies": {
39
39
  "@applicaster/zapp-pipes-v2-client": "*",
40
40
  "@react-native-community/netinfo": "*",
41
- "immer": "*",
42
41
  "react": "*",
43
42
  "react-native": "*",
44
43
  "uglify-js": "*",