@reactive-cache/core 3.1.0 → 3.2.0

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 CHANGED
@@ -4,6 +4,23 @@
4
4
  <img src="https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white" />
5
5
  </a>
6
6
 
7
+ ## Core Idea
8
+
9
+ You give it a data source, it returns an Observable-like object that:
10
+ - Lazily fetches data only when subscribed to
11
+ - Caches the result to prevent redundant calls
12
+ - Allows manual updates (next(), update(), resetState())
13
+ - Provides synchronous access to the current value (in certain variants)
14
+
15
+ ## Cache Variants
16
+ | Factory | Description |
17
+ |----------|:-------------:|
18
+ | reactiveCache() | Full-featured cache with manual updates |
19
+ | reactiveCache.readonly() | Immutable — no manual state changes |
20
+ | reactiveCache.valueReadable() | Adds synchronous getValue() access |
21
+ | reactiveCache.anonymous() | Unnamed (no global tracking) |
22
+ | reactiveCache.constant() | Emits once, ignores subsequent parent updates |
23
+
7
24
  ## Installation
8
25
 
9
26
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactive-cache/core",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "npx tsc && tsx watch src/test.ts && echo 'all tests are complete!'",
package/.gitattributes DELETED
@@ -1,2 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto