@koine/browser 1.0.97 → 1.0.98
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/createStorage.js +3 -3
- package/node/createStorage.js +3 -3
- package/node/storageClient.js +1 -1
- package/package.json +3 -3
- package/storageClient.js +1 -1
package/createStorage.js
CHANGED
|
@@ -54,7 +54,7 @@ export var createStorage = function (config, useSessionStorage) {
|
|
|
54
54
|
* Non-string values are stringified with `JSON.stringify()`
|
|
55
55
|
*/
|
|
56
56
|
set: function (key, value) {
|
|
57
|
-
client.set(key, value, encode);
|
|
57
|
+
client.set(keys[key], value, encode);
|
|
58
58
|
},
|
|
59
59
|
/**
|
|
60
60
|
* Set all given storage values (it uses `localStorage.set()`).
|
|
@@ -72,10 +72,10 @@ export var createStorage = function (config, useSessionStorage) {
|
|
|
72
72
|
for (var key in newValues) {
|
|
73
73
|
var value = newValues[key];
|
|
74
74
|
if (!isNullOrUndefined(value)) {
|
|
75
|
-
client.set(key, value);
|
|
75
|
+
client.set(keys[key], value);
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
|
-
client.remove(key);
|
|
78
|
+
client.remove(keys[key]);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
package/node/createStorage.js
CHANGED
|
@@ -57,7 +57,7 @@ var createStorage = function (config, useSessionStorage) {
|
|
|
57
57
|
* Non-string values are stringified with `JSON.stringify()`
|
|
58
58
|
*/
|
|
59
59
|
set: function (key, value) {
|
|
60
|
-
client.set(key, value, utils_1.encode);
|
|
60
|
+
client.set(keys[key], value, utils_1.encode);
|
|
61
61
|
},
|
|
62
62
|
/**
|
|
63
63
|
* Set all given storage values (it uses `localStorage.set()`).
|
|
@@ -75,10 +75,10 @@ var createStorage = function (config, useSessionStorage) {
|
|
|
75
75
|
for (var key in newValues) {
|
|
76
76
|
var value = newValues[key];
|
|
77
77
|
if (!(0, utils_1.isNullOrUndefined)(value)) {
|
|
78
|
-
client.set(key, value);
|
|
78
|
+
client.set(keys[key], value);
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
81
|
-
client.remove(key);
|
|
81
|
+
client.remove(keys[key]);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
package/node/storageClient.js
CHANGED
|
@@ -12,7 +12,7 @@ var storageClient = function (useSessionStorage) {
|
|
|
12
12
|
? window[useSessionStorage ? "sessionStorage" : "localStorage"][methodsMap[method]](key, value)
|
|
13
13
|
: function () {
|
|
14
14
|
if (process.env["NODE_ENV"] !== "production") {
|
|
15
|
-
console.warn("[@koine/utils:
|
|
15
|
+
console.warn("[@koine/utils:storageClient]: ".concat(useSessionStorage ? "sessionStorage" : "localStorage", " does not exists outside of browser."));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"typings": "./index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@koine/utils": "1.0.
|
|
7
|
+
"@koine/utils": "1.0.98",
|
|
8
8
|
"ts-debounce": "^4.0.0",
|
|
9
|
-
"@koine/dom": "1.0.
|
|
9
|
+
"@koine/dom": "1.0.98",
|
|
10
10
|
"date-fns-tz": "^1.3.7",
|
|
11
11
|
"tslib": "^2.4.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {},
|
|
14
|
-
"version": "1.0.
|
|
14
|
+
"version": "1.0.98",
|
|
15
15
|
"module": "./index.js",
|
|
16
16
|
"types": "./index.d.ts"
|
|
17
17
|
}
|
package/storageClient.js
CHANGED
|
@@ -9,7 +9,7 @@ export var storageClient = function (useSessionStorage) {
|
|
|
9
9
|
? window[useSessionStorage ? "sessionStorage" : "localStorage"][methodsMap[method]](key, value)
|
|
10
10
|
: function () {
|
|
11
11
|
if (process.env["NODE_ENV"] !== "production") {
|
|
12
|
-
console.warn("[@koine/utils:
|
|
12
|
+
console.warn("[@koine/utils:storageClient]: ".concat(useSessionStorage ? "sessionStorage" : "localStorage", " does not exists outside of browser."));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
};
|