flat-cache 6.1.1 → 6.1.2
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/README.md +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
- Easily Loads the data from disk and into memory with `load` or `loadFile`
|
|
18
18
|
- Uses `ttl` and `lruSize` to manage the cache and persist the data
|
|
19
19
|
- Only saves the data to disk if the data has changed even when using `persistInterval` or calling `save()`
|
|
20
|
-
- Uses `flatted` to parse and stringify the data by default but can be overridden using `
|
|
20
|
+
- Uses `flatted` to parse and stringify the data by default but can be overridden using `serialize` and `deserialize` in options
|
|
21
21
|
- ESM and CommonJS support with TypeScript typings and maintained regularly!
|
|
22
22
|
|
|
23
23
|
# Table of Contents
|
|
@@ -176,8 +176,8 @@ By default `flat-cache` uses `flatted` to parse and stringify the data. This is
|
|
|
176
176
|
```javascript
|
|
177
177
|
import { FlatCache } from 'flat-cache';
|
|
178
178
|
const cache = new FlatCache({
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
deserialize: JSON.parse,
|
|
180
|
+
serialize: JSON.stringify,
|
|
181
181
|
});
|
|
182
182
|
```
|
|
183
183
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flat-cache",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"description": "A simple key/value storage using files to persist the data",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"file-system-cache"
|
|
53
53
|
],
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@types/node": "^22.
|
|
55
|
+
"@types/node": "^22.8.1",
|
|
56
56
|
"@vitest/coverage-v8": "^2.1.3",
|
|
57
57
|
"rimraf": "^6.0.1",
|
|
58
|
-
"tsup": "^8.3.
|
|
58
|
+
"tsup": "^8.3.5",
|
|
59
59
|
"typescript": "^5.6.3",
|
|
60
60
|
"vitest": "^2.1.3",
|
|
61
61
|
"xo": "^0.59.3"
|