tools-min-ns 1.17.1 → 1.18.0
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/README.md +3 -0
- package/esm/storage/StorageUtil.js +2 -2
- package/lib/storage/StorageUtil.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,14 +26,14 @@ var StorageUtil;
|
|
|
26
26
|
(function (StorageUtil) {
|
|
27
27
|
function setItem(name, data, opts) {
|
|
28
28
|
var cacheType = (opts === null || opts === void 0 ? void 0 : opts.type) || config.cacheType;
|
|
29
|
-
if (name && data !== undefined) window["".concat(cacheType, "Storage")].setItem((opts === null || opts === void 0 ? void 0 : opts.itemName) || "".concat(config.title).concat(name), PasswordUtil.
|
|
29
|
+
if (name && data !== undefined) window["".concat(cacheType, "Storage")].setItem((opts === null || opts === void 0 ? void 0 : opts.itemName) || "".concat(config.title).concat(name), PasswordUtil.xorEncryptData(data));
|
|
30
30
|
}
|
|
31
31
|
StorageUtil.setItem = setItem;
|
|
32
32
|
function getItem(name, opts) {
|
|
33
33
|
var cacheType = (opts === null || opts === void 0 ? void 0 : opts.type) || config.cacheType;
|
|
34
34
|
var item = window["".concat(cacheType, "Storage")].getItem((opts === null || opts === void 0 ? void 0 : opts.itemName) || "".concat(config.title).concat(name));
|
|
35
35
|
try {
|
|
36
|
-
return
|
|
36
|
+
return PasswordUtil.xorDecryptData(item);
|
|
37
37
|
} catch (error) {
|
|
38
38
|
return item;
|
|
39
39
|
}
|
|
@@ -36,14 +36,14 @@ var StorageUtil;
|
|
|
36
36
|
(function (StorageUtil) {
|
|
37
37
|
function setItem(name, data, opts) {
|
|
38
38
|
var cacheType = (opts === null || opts === void 0 ? void 0 : opts.type) || config_1.default.cacheType;
|
|
39
|
-
if (name && data !== undefined) window["".concat(cacheType, "Storage")].setItem((opts === null || opts === void 0 ? void 0 : opts.itemName) || "".concat(config_1.default.title).concat(name), PasswordUtil_1.default.
|
|
39
|
+
if (name && data !== undefined) window["".concat(cacheType, "Storage")].setItem((opts === null || opts === void 0 ? void 0 : opts.itemName) || "".concat(config_1.default.title).concat(name), PasswordUtil_1.default.xorEncryptData(data));
|
|
40
40
|
}
|
|
41
41
|
StorageUtil.setItem = setItem;
|
|
42
42
|
function getItem(name, opts) {
|
|
43
43
|
var cacheType = (opts === null || opts === void 0 ? void 0 : opts.type) || config_1.default.cacheType;
|
|
44
44
|
var item = window["".concat(cacheType, "Storage")].getItem((opts === null || opts === void 0 ? void 0 : opts.itemName) || "".concat(config_1.default.title).concat(name));
|
|
45
45
|
try {
|
|
46
|
-
return
|
|
46
|
+
return PasswordUtil_1.default.xorDecryptData(item);
|
|
47
47
|
} catch (error) {
|
|
48
48
|
return item;
|
|
49
49
|
}
|