roboto-js 1.6.3 → 1.6.5
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/dist/cjs/index.cjs +11 -0
- package/dist/esm/index.js +7 -0
- package/package.json +1 -1
- package/src/index.js +14 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -48,6 +48,7 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
48
48
|
return Roboto.instance;
|
|
49
49
|
}
|
|
50
50
|
var isBrowser = typeof window !== "undefined";
|
|
51
|
+
this.data = {};
|
|
51
52
|
this.config = {
|
|
52
53
|
accessKey: accessKey,
|
|
53
54
|
// Use passed accessKey
|
|
@@ -92,6 +93,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
92
93
|
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
93
94
|
return this.api.getSiteEnv(key);
|
|
94
95
|
}
|
|
96
|
+
}, {
|
|
97
|
+
key: "setItem",
|
|
98
|
+
value: function setItem(key, value) {
|
|
99
|
+
this.data[key] = value;
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "getItem",
|
|
103
|
+
value: function getItem(key) {
|
|
104
|
+
return this.data[key];
|
|
105
|
+
}
|
|
95
106
|
}, {
|
|
96
107
|
key: "setAppServiceHost",
|
|
97
108
|
value: function setAppServiceHost(host) {
|
package/dist/esm/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export default class Roboto {
|
|
|
17
17
|
return Roboto.instance;
|
|
18
18
|
}
|
|
19
19
|
const isBrowser = typeof window !== "undefined";
|
|
20
|
+
this.data = {};
|
|
20
21
|
this.config = {
|
|
21
22
|
accessKey: accessKey,
|
|
22
23
|
// Use passed accessKey
|
|
@@ -56,6 +57,12 @@ export default class Roboto {
|
|
|
56
57
|
getSiteEnv(key = null) {
|
|
57
58
|
return this.api.getSiteEnv(key);
|
|
58
59
|
}
|
|
60
|
+
setItem(key, value) {
|
|
61
|
+
this.data[key] = value;
|
|
62
|
+
}
|
|
63
|
+
getItem(key) {
|
|
64
|
+
return this.data[key];
|
|
65
|
+
}
|
|
59
66
|
setAppServiceHost(host) {
|
|
60
67
|
// DEVELOPMENT
|
|
61
68
|
host = this._stripHttpsForDomains(host, ['localhost']);
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export default class Roboto{
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const isBrowser = typeof window !== "undefined";
|
|
25
|
-
|
|
25
|
+
this.data = {};
|
|
26
26
|
this.config = {
|
|
27
27
|
accessKey: accessKey, // Use passed accessKey
|
|
28
28
|
baseUrl: `https://${host}`, // Use passed host
|
|
@@ -68,6 +68,19 @@ export default class Roboto{
|
|
|
68
68
|
return this.api.getSiteEnv(key);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
|
|
72
|
+
setItem(key, value){
|
|
73
|
+
|
|
74
|
+
this.data[key] = value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
getItem(key){
|
|
78
|
+
|
|
79
|
+
return this.data[key];
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
71
84
|
setAppServiceHost(host){
|
|
72
85
|
|
|
73
86
|
// DEVELOPMENT
|