@thi.ng/cache 2.1.102 → 2.1.104

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-01T15:22:50Z
3
+ - **Last updated**: 2024-03-07T20:40:47Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -216,8 +216,10 @@ instance's default (provided via ctor option arg). If no instance TTL is
216
216
  given, TTL defaults to 1 hour.
217
217
 
218
218
  ```ts
219
+ import { TLRUCache } from "@thi.ng/cache";
220
+
219
221
  // same opts as LRUCache, but here with custom TTL period (in ms)
220
- tlru = new cache.TLRUCache(null, { ttl: 10000 });
222
+ tlru = new TLRUCache(null, { ttl: 10000 });
221
223
 
222
224
  // with item specific TTL (500ms)
223
225
  tlru.set("foo", 42, 500)
@@ -228,8 +230,10 @@ tlru.set("foo", 42, 500)
228
230
  Similar to LRU, but removes most recently accessed items first. [Wikipedia](https://en.wikipedia.org/wiki/Cache_replacement_policies#Most_recently_used_(MRU))
229
231
 
230
232
  ```ts
233
+ import { MRUCache } from "@thi.ng/cache";
234
+
231
235
  // same opts as LRUCache
232
- mru = new cache.MRUCache();
236
+ mru = new MRUCache();
233
237
  ```
234
238
 
235
239
  ## Authors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/cache",
3
- "version": "2.1.102",
3
+ "version": "2.1.104",
4
4
  "description": "In-memory cache implementations with ES6 Map-like API and different eviction strategies",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -32,12 +32,13 @@
32
32
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
33
33
  "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
34
34
  "pub": "yarn npm publish --access public",
35
- "test": "bun test"
35
+ "test": "bun test",
36
+ "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
36
37
  },
37
38
  "dependencies": {
38
- "@thi.ng/api": "^8.9.27",
39
- "@thi.ng/dcons": "^3.2.97",
40
- "@thi.ng/transducers": "^8.9.8"
39
+ "@thi.ng/api": "^8.9.28",
40
+ "@thi.ng/dcons": "^3.2.99",
41
+ "@thi.ng/transducers": "^8.9.10"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@microsoft/api-extractor": "^7.40.1",
@@ -90,5 +91,5 @@
90
91
  ],
91
92
  "year": 2018
92
93
  },
93
- "gitHead": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
94
+ "gitHead": "a421058a65ba76608d94129ac29451bfedaf201c\n"
94
95
  }