@taybart/corvid 0.1.23 → 0.1.25

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