@capillarytech/cap-ui-utils 2.0.4 → 2.0.6
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/cap-ui-utils",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Utility functions shared accross all the modules",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"author": "Rajshekar",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"base64-js": "
|
|
11
|
+
"base64-js": "1.5.1",
|
|
12
12
|
"handlebars": "4.0.11",
|
|
13
13
|
"lodash": "4.17.11",
|
|
14
14
|
"moment-timezone": "^0.5.25",
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
"react-ga": "^3.3.1",
|
|
17
17
|
"react-intl": "6.6.6",
|
|
18
18
|
"tti-polyfill": "^0.2.2",
|
|
19
|
-
"zlib": "
|
|
19
|
+
"zlib": "1.0.5"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -21,11 +21,11 @@ const decompressJsonObject = async (base64Compressed) => {
|
|
|
21
21
|
// Decode the base64 string to buffer
|
|
22
22
|
if (base64Compressed && typeof base64Compressed === 'string') {
|
|
23
23
|
const compressedBuffer = decodeBase64(base64Compressed);
|
|
24
|
-
//
|
|
24
|
+
// Decompress the buffer
|
|
25
25
|
const decompressedBuffer = await decompressData(compressedBuffer);
|
|
26
26
|
// Convert buffer to string
|
|
27
27
|
const jsonString = decompressedBuffer.toString();
|
|
28
|
-
//
|
|
28
|
+
// Parse JSON string to object
|
|
29
29
|
const jsonObject = JSON.parse(jsonString);
|
|
30
30
|
return jsonObject;
|
|
31
31
|
}
|