@letscooee/web-sdk 0.0.6 → 0.0.7

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.
@@ -67,6 +67,28 @@ var LocalStorageHelper = /** @class */ (function () {
67
67
  LocalStorageHelper.setBoolean = function (key, value) {
68
68
  LocalStorageHelper.setString(key, JSON.stringify(value));
69
69
  };
70
+ /**
71
+ * Get value from local storage.
72
+ *
73
+ * @param {string} key key provided for the stored value.
74
+ * @return {any} value stored.
75
+ */
76
+ LocalStorageHelper.getObject = function (key) {
77
+ try {
78
+ return JSON.parse(LocalStorageHelper.getString(key, ''));
79
+ }
80
+ catch (ignored) {
81
+ return null;
82
+ }
83
+ };
84
+ /**
85
+ * Set value in local storage as json string.
86
+ * @param {string} key key provided for the storing value.
87
+ * @param {any} value value stored.
88
+ */
89
+ LocalStorageHelper.setObject = function (key, value) {
90
+ LocalStorageHelper.setString(key, JSON.stringify(value));
91
+ };
70
92
  /**
71
93
  * Remove the specified key from storage.
72
94
  *
package/dist/utils/log.js CHANGED
@@ -22,7 +22,7 @@ var Log = /** @class */ (function () {
22
22
  *
23
23
  * @param {any} messages
24
24
  */
25
- Log.l = function () {
25
+ Log.log = function () {
26
26
  var messages = [];
27
27
  for (var _i = 0; _i < arguments.length; _i++) {
28
28
  messages[_i] = arguments[_i];
@@ -34,7 +34,7 @@ var Log = /** @class */ (function () {
34
34
  *
35
35
  * @param {any} messages
36
36
  */
37
- Log.e = function () {
37
+ Log.error = function () {
38
38
  var messages = [];
39
39
  for (var _i = 0; _i < arguments.length; _i++) {
40
40
  messages[_i] = arguments[_i];
@@ -46,7 +46,7 @@ var Log = /** @class */ (function () {
46
46
  *
47
47
  * @param {any} messages
48
48
  */
49
- Log.w = function () {
49
+ Log.warning = function () {
50
50
  var messages = [];
51
51
  for (var _i = 0; _i < arguments.length; _i++) {
52
52
  messages[_i] = arguments[_i];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@letscooee/web-sdk",
3
3
  "description": "Hyperpersonalised Mobile/Web App Re-Engagement via Machine Learning",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "scripts": {
6
6
  "lint": "eslint 'src/**'",
7
7
  "prepare": "npm run build",
@@ -31,9 +31,9 @@
31
31
  "homepage": "https://github.com/letscooee/cooee-web-sdk#readme",
32
32
  "devDependencies": {
33
33
  "@types/ua-parser-js": "^0.7.36",
34
- "@typescript-eslint/eslint-plugin": "^4.31.0",
35
- "@typescript-eslint/parser": "^4.31.0",
36
- "eslint": "^7.32.0",
34
+ "@typescript-eslint/eslint-plugin": "^5.10.0",
35
+ "@typescript-eslint/parser": "^5.10.0",
36
+ "eslint": "^8.7.0",
37
37
  "eslint-config-google": "^0.14.0",
38
38
  "ts-loader": "^9.2.4",
39
39
  "typescript": "^4.4.4",