use-json-localstorage 1.3.4 → 1.3.5

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.cjs CHANGED
@@ -74,6 +74,7 @@ var getRuntimeLocalStorage = () => {
74
74
  remove: (key) => {
75
75
  globalThis.localStorage.removeItem(key);
76
76
  emitter.emit(`remove`, { key });
77
+ return;
77
78
  },
78
79
  on: (type, callback) => {
79
80
  return emitter.on(type, callback);
package/dist/index.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  interface SerializeStorage {
2
2
  set: <T>(key: string, value: T) => void;
3
3
  get: <T>(key: string) => T | null;
4
+ remove: (key: string) => void;
4
5
  on: (type: string, callback: (event: LocalStorageEvent) => void) => () => void;
5
6
  }
6
7
  type LocalStorageEvent = {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  interface SerializeStorage {
2
2
  set: <T>(key: string, value: T) => void;
3
3
  get: <T>(key: string) => T | null;
4
+ remove: (key: string) => void;
4
5
  on: (type: string, callback: (event: LocalStorageEvent) => void) => () => void;
5
6
  }
6
7
  type LocalStorageEvent = {
package/dist/index.js CHANGED
@@ -37,6 +37,7 @@ var getRuntimeLocalStorage = () => {
37
37
  remove: (key) => {
38
38
  globalThis.localStorage.removeItem(key);
39
39
  emitter.emit(`remove`, { key });
40
+ return;
40
41
  },
41
42
  on: (type, callback) => {
42
43
  return emitter.on(type, callback);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-json-localstorage",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "JSON local storage for React",
5
5
  "repository": {
6
6
  "type": "git",