We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5961985 commit 380baccCopy full SHA for 380bacc
CHANGELOG.md
@@ -1,5 +1,9 @@
1
# Changelog
2
3
+## 0.4.1 (DEV)
4
+
5
+- Fix: `createLocalStorageDriver` didn't use `serialize` and `unserialize`.
6
7
## 0.4.0 (2023-12-06)
8
9
- **BREAKING**: Drop Node < 18.
src/localStorage.ts
@@ -41,8 +41,8 @@ export function createLocalStorageDriver<V>(
41
// ...options,
42
storage: options.storage ?? window.localStorage,
43
prefix: options.prefix ?? 'persistent',
44
- serialize: JSON.stringify,
45
- unserialize: JSON.parse,
+ serialize: options.serialize ?? JSON.stringify,
+ unserialize: options.unserialize ?? JSON.parse,
46
});
47
}
48
0 commit comments