rx-tiny-flux 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/Readme.md +10 -5
  2. package/package.json +1 -1
package/Readme.md CHANGED
@@ -116,9 +116,9 @@ const incrementAsyncEffect = createEffect((actions$) =>
116
116
 
117
117
  ---
118
118
 
119
- ## Using RxJS Operators
119
+ ## RxJS Operators for ZeppOS
120
120
 
121
- For use in restricted environments like **ZeppOS**, where direct dependencies are not allowed, `Rx-Tiny-Flux` re-exports a curated set of common RxJS operators and creation functions from a dedicated entry point: `rx-tiny-flux/rxjs`. This allows you to build complex effects without needing to import from `rxjs` directly in your application code.
121
+ For use in restricted environments like **ZeppOS**, where direct dependencies on `rxjs` are not allowed, `Rx-Tiny-Flux` re-exports a curated set of common RxJS operators and creation functions from its ZeppOS-specific entry point: `rx-tiny-flux/zeppos`. This allows you to build complex effects without needing to manage RxJS imports in your application code.
122
122
 
123
123
  **Available Exports:**
124
124
 
@@ -127,6 +127,9 @@ For use in restricted environments like **ZeppOS**, where direct dependencies ar
127
127
  * `of`: Emits a variable number of arguments as a sequence and then completes.
128
128
  * `defer`: Creates an Observable that, on subscription, calls an Observable factory to make a fresh Observable for each new Subscriber.
129
129
 
130
+ * **Constants:**
131
+ * `EMPTY`: An Observable that emits no items to the Observer and immediately emits a complete notification. It's useful in effects to stop a stream without dispatching a new action.
132
+
130
133
  * **Higher-Order Mapping Operators:** Used to manage inner Observables, typically for handling asynchronous operations like API calls.
131
134
  * `concatMap`: Maps to an inner Observable and processes them sequentially.
132
135
  * `switchMap`: Maps to an inner Observable but cancels the previous inner subscription if a new outer value arrives.
@@ -140,11 +143,13 @@ For use in restricted environments like **ZeppOS**, where direct dependencies ar
140
143
  * `delay`: Delays the emission of items from the source Observable by a given timeout.
141
144
  * `catchError`: Catches errors on the source Observable and returns a new Observable or throws an error.
142
145
 
146
+ * **Utilities:**
147
+ * `pipe`: A utility function for composing operators in a readable, left-to-right sequence. While `Observable.pipe()` is the most common usage, having `pipe` available allows for creating reusable operator compositions.
148
+
143
149
  ```javascript
144
- // Instead of: import { map, from } from 'rxjs';
145
- // You can do:
150
+ // Instead of managing `rxjs` imports, you can get everything from the `zeppos` entry point:
146
151
  import { createEffect, ofType } from 'rx-tiny-flux';
147
- import { map, from } from 'rx-tiny-flux/rxjs';
152
+ import { map, from, isApp, propagateAction } from 'rx-tiny-flux/zeppos';
148
153
 
149
154
  // ... your effect implementation
150
155
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rx-tiny-flux",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "A lightweight, minimalist state management library for pure JavaScript projects, inspired by NgRx and Redux, and built with RxJS.",
5
5
  "author": "Bernardo Baumblatt <baumblatt@gmail.com>",
6
6
  "license": "MIT",