@taybart/corvid 0.1.23 → 0.1.24
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/index.js +1 -3
- package/dist/ls.js +1 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -721,9 +721,8 @@ function local_storage_update(key, update1, broadcast = false) {
|
|
|
721
721
|
}
|
|
722
722
|
function set(key, value, broadcast = false) {
|
|
723
723
|
if ('object' == typeof value) value = JSON.stringify(value);
|
|
724
|
-
console.log('set');
|
|
725
|
-
localStorage.setItem(key, value);
|
|
726
724
|
const prev = get(key);
|
|
725
|
+
localStorage.setItem(key, value);
|
|
727
726
|
if (prev !== value || broadcast) {
|
|
728
727
|
const event = new CustomEvent('@corvid/ls-update', {
|
|
729
728
|
detail: {
|
|
@@ -731,7 +730,6 @@ function set(key, value, broadcast = false) {
|
|
|
731
730
|
value
|
|
732
731
|
}
|
|
733
732
|
});
|
|
734
|
-
console.log('broadcast');
|
|
735
733
|
document.dispatchEvent(event);
|
|
736
734
|
}
|
|
737
735
|
}
|
package/dist/ls.js
CHANGED
|
@@ -276,9 +276,8 @@ function local_storage_update(key, update1, broadcast = false) {
|
|
|
276
276
|
}
|
|
277
277
|
function set(key, value, broadcast = false) {
|
|
278
278
|
if ('object' == typeof value) value = JSON.stringify(value);
|
|
279
|
-
console.log('set');
|
|
280
|
-
localStorage.setItem(key, value);
|
|
281
279
|
const prev = get(key);
|
|
280
|
+
localStorage.setItem(key, value);
|
|
282
281
|
if (prev !== value || broadcast) {
|
|
283
282
|
const event = new CustomEvent('@corvid/ls-update', {
|
|
284
283
|
detail: {
|
|
@@ -286,7 +285,6 @@ function set(key, value, broadcast = false) {
|
|
|
286
285
|
value
|
|
287
286
|
}
|
|
288
287
|
});
|
|
289
|
-
console.log('broadcast');
|
|
290
288
|
document.dispatchEvent(event);
|
|
291
289
|
}
|
|
292
290
|
}
|