timeout-flow 0.0.3 → 0.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 +11 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,9 @@
9
9
 
10
10
  TimeoutFlow makes working with time-based logic intuitive — think of it as a modern, composable upgrade to `setTimeout` and `setInterval`, with added powers like chaining, conditional logic, pause/resume, retries, and more.
11
11
 
12
+ * Minified: 6.64 KB
13
+ * Gzipped: 2.6 KB
14
+
12
15
  ---
13
16
 
14
17
  ## Philosophy
@@ -146,13 +149,13 @@ import { debounce, throttle, retry, waitFor } from 'timeout-flow';
146
149
 
147
150
  ---
148
151
 
149
- ## 📈 Frame-Based Timing (RAF Utilities)
152
+ ## Frame-Based Timing (RAF Utilities)
150
153
 
151
154
  These helpers use `requestAnimationFrame` under the hood to provide smooth, energy-efficient timing. Ideal for visual UI flows, canvas apps, scroll/resize behavior, and performance-sensitive interactions.
152
155
 
153
156
  All `raf` utilities automatically **pause in background tabs**, unlike timers.
154
157
 
155
- ### 👉 API Summary
158
+ ### API Summary
156
159
 
157
160
  | Function | Purpose | Best For |
158
161
  | -------------------------- | ------------------------------------------------------------------- | -------------------------------------------------- |
@@ -164,12 +167,12 @@ All `raf` utilities automatically **pause in background tabs**, unlike timers.
164
167
  | `throttleRaf(fn, 2)` | Throttles to once every 3 frames (`frameSkip = 2`). | Advanced visuals, slower sync without timers |
165
168
  | `waitForRaf()` | Waits for a condition to become true using a frame-based loop. | DOM readiness, layout stability, visibility checks |
166
169
 
167
- ### ✨ Key Advantages
170
+ ### Key Advantages
168
171
 
169
- * 🔄 **Frame-sync**: Triggered in sync with visual updates (60Hz or higher)
170
- * 🛌 **Background-tab safe**: No CPU use when inactive
171
- * ⚡ **Energy efficient**: Great for battery-conscious apps
172
- * 🫘 **Smoother UX**: Especially under load or heavy visuals
172
+ * **Frame-sync**: Triggered in sync with visual updates (60Hz or higher)
173
+ * **Background-tab safe**: No CPU use when inactive
174
+ * **Energy efficient**: Great for battery-conscious apps
175
+ * **Smoother UX**: Especially under load or heavy visuals
173
176
 
174
177
  ### 🛠 Example Usage
175
178
 
@@ -217,7 +220,7 @@ import { waitForRaf } from 'timeout-flow';
217
220
  await waitForRaf(() => document.querySelector('#panel')?.offsetHeight > 0);
218
221
  ```
219
222
 
220
- ### 📦 File Locations
223
+ ### File Locations
221
224
 
222
225
  | File | Description |
223
226
  | -------------------- | ------------------------------------------------------ |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "timeout-flow",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "description": "Fluent, composable, pauseable JavaScript timers and time control flows — plus RAF utilities for frame-based logic.",
6
6
  "keywords": [