seitu 0.5.2 → 0.5.4
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/web.js +9 -3
- package/package.json +1 -1
package/dist/web.js
CHANGED
|
@@ -53,8 +53,11 @@ function i(n) {
|
|
|
53
53
|
let t = window[n.kind];
|
|
54
54
|
r = !0, Object.entries(e).forEach(([e, r]) => {
|
|
55
55
|
let i = typeof r == "string" ? r : JSON.stringify(r);
|
|
56
|
-
t.setItem(n.keyTransform ? n.keyTransform(e) : e, i)
|
|
57
|
-
|
|
56
|
+
t.setItem(n.keyTransform ? n.keyTransform(e) : e, i), window.dispatchEvent(new StorageEvent("storage", {
|
|
57
|
+
key: n.keyTransform ? n.keyTransform(e) : e,
|
|
58
|
+
newValue: i
|
|
59
|
+
}));
|
|
60
|
+
}), r = !1;
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
}), a = () => {
|
|
@@ -123,7 +126,10 @@ function o(t) {
|
|
|
123
126
|
set: (e) => {
|
|
124
127
|
if (typeof window > "u") return;
|
|
125
128
|
let n = window[r], a = typeof e == "function" ? e(l()) : e;
|
|
126
|
-
i = !0, n.setItem(t.key, typeof a == "string" ? a : JSON.stringify(a)), window.dispatchEvent(new
|
|
129
|
+
i = !0, n.setItem(t.key, typeof a == "string" ? a : JSON.stringify(a)), window.dispatchEvent(new StorageEvent("storage", {
|
|
130
|
+
key: t.key,
|
|
131
|
+
newValue: a
|
|
132
|
+
})), i = !1, c();
|
|
127
133
|
},
|
|
128
134
|
subscribe: (e) => s(() => e(l())),
|
|
129
135
|
remove: () => {
|