use-json-localstorage 1.3.2 → 1.3.3

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
@@ -98,7 +98,7 @@ var useLocalStorageValue = (key, defaultValue) => {
98
98
  return value != null ? value : defaultValue;
99
99
  },
100
100
  () => {
101
- return defaultValue;
101
+ return void 0;
102
102
  }
103
103
  );
104
104
  };
package/dist/index.d.cts CHANGED
@@ -9,6 +9,6 @@ type LocalStorageEvent = {
9
9
  };
10
10
  declare const getRuntimeLocalStorage: () => SerializeStorage;
11
11
 
12
- declare const useLocalStorageValue: <T>(key: string, defaultValue: T) => T;
12
+ declare const useLocalStorageValue: <T>(key: string, defaultValue?: T) => T | undefined;
13
13
 
14
14
  export { getRuntimeLocalStorage, useLocalStorageValue };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,6 @@ type LocalStorageEvent = {
9
9
  };
10
10
  declare const getRuntimeLocalStorage: () => SerializeStorage;
11
11
 
12
- declare const useLocalStorageValue: <T>(key: string, defaultValue: T) => T;
12
+ declare const useLocalStorageValue: <T>(key: string, defaultValue?: T) => T | undefined;
13
13
 
14
14
  export { getRuntimeLocalStorage, useLocalStorageValue };
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ var useLocalStorageValue = (key, defaultValue) => {
61
61
  return value != null ? value : defaultValue;
62
62
  },
63
63
  () => {
64
- return defaultValue;
64
+ return void 0;
65
65
  }
66
66
  );
67
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-json-localstorage",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "JSON local storage for React",
5
5
  "repository": {
6
6
  "type": "git",