@vicaniddouglas/js_aide 1.13.1 → 1.13.3

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 +26 -34
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,56 +6,46 @@
6
6
 
7
7
  ## 🕹️ Live Playground
8
8
  Explore all library features—including the new Asynchronous Handshaking system—directly in our **[Interactive Sandbox](https://vicaniddouglas.gitlab.io/js_aide)**.
9
- npm explore @vicaniddouglas/js_aide -- npm run serve:demo
10
- ```
11
9
 
12
10
  ### `Router`
13
11
 
14
- A modern, feature-rich client-side router for Single-Page Applications (SPAs).
15
-
16
- - History API-based navigation.
17
- - Supports dynamic route segments (e.g., `/users/:id`).
18
- - Automatic interception of internal `<a>` tags for seamless SPA navigation.
19
- - Configurable route guards (`beforeNavigate`) with support for redirects.
20
- - View lifecycle hooks (`beforeEnter`, `beforeLeave`) directly on DOM elements for managing view transitions and data loading.
21
- - Parses and exposes URL query parameters and hash fragments.
22
- - Efficient view toggling, only hiding the previously active view.
12
+ A modern, feature-rich client-side router for Single-Page Applications (SPAs). Features include History API navigation, dynamic route segments (`/users/:id`), and view lifecycle hooks (`beforeEnter`, `beforeLeave`).
23
13
 
24
- ### `validator`
14
+ ### `Validator`
25
15
 
26
- A module offering various input validation utilities (e.g., email, number, custom regex).
16
+ A collection of high-precision validation utilities. Handles complex email logic, phone number formatting, and mandatory field checks out of the box.
27
17
 
28
- ### `inputHandlers`
18
+ ### `Input Handlers`
29
19
 
30
- Utilities for enhanced DOM element interaction, such as restricting input to numbers, formatting number inputs, or providing custom select options.
20
+ Utilities for enhanced DOM interaction, such as restricting input to specific characters, real-time number formatting, and custom select behaviors.
31
21
 
32
- ### `requests`
22
+ ### `HTTP Engine`
33
23
 
34
- Helper functions for making HTTP requests (e.g., `fetch` wrappers for common patterns).
24
+ A "Zero-Touch" HTTP client built on `sendRequest`. Features automatic retries with exponential backoff, request queuing, and standardized response objects.
35
25
 
36
- ### `dates`
26
+ ### `Dates & Timing`
37
27
 
38
- Convenience functions for common date and time manipulation tasks.
28
+ Convenience functions for complex date manipulation, including relative timing (`timeAgo`), `humanizeDate`, and range calculations.
39
29
 
40
- ### `fileManager`
30
+ ### `File Manager`
41
31
 
42
- Utilities for browser-side file handling (e.g., file uploads, local storage, file type checks).
32
+ Robust utilities for browser-side file handling, including dynamic `DataExporter` for Excel/PDF and secure file upload orchestration.
43
33
 
44
- ### `camera`
34
+ ### `Camera`
45
35
 
46
- Functions for interacting with device cameras, capturing images or video streams (requires browser API support).
36
+ Advanced module for interacting with device cameras, allowing image capture and video stream management with a single promise-based API.
47
37
 
48
- ### `figures`
38
+ ### `Figures & Formatting`
49
39
 
50
- Utilities for number formatting, currency (including UGX defaults), and percentages.
40
+ Specialized formatting for financial data. Includes native support for **UGX** (Ugandan Shilling) currency defaults and abbreviated large numbers.
51
41
 
52
- ### `dependencyManager`
42
+ ### `Dependency Manager`
53
43
 
54
- A robust manager for dynamically loading CDN-based libraries (like SheetJS or jsPDF) with retry logic and dependency tracking.
44
+ A smart loader for external libraries (like SheetJS or jsPDF). Manages CDN fallbacks, retry logic, and ensures libraries are only loaded when needed.
55
45
 
56
- ### `WebSocketClient`
46
+ ### `WebSocket Client`
57
47
 
58
- A professional-grade WebSocket client featuring automatic reconnection, heartbeat/health monitoring, and a built-in instance registry to prevent duplicate connections. Supports namespaces, rooms, and message acknowledgements.
48
+ A professional-grade WebSocket implementation with automatic reconnection, heartbeat monitoring, and a registry to prevent duplicate connections.
59
49
 
60
50
  ## Installation
61
51
 
@@ -80,11 +70,13 @@ Ensure your project is configured to use ES Modules (e.g., by adding `"type": "m
80
70
  You can import specific modules or all of them:
81
71
 
82
72
  ```javascript
83
- // Import specific modules
84
- import { Router, validator } from "@vicaniddouglas/js_aide";
85
-
86
- // Or import all, though generally not recommended for tree-shaking
87
- // import * => JSAide from '@vicaniddouglas/js_aide';
73
+ // Import specific modules for best tree-shaking
74
+ import {
75
+ Router,
76
+ sendRequest,
77
+ validatePhoneNumber,
78
+ humanizeDate
79
+ } from "@vicaniddouglas/js_aide";
88
80
  ```
89
81
 
90
82
  ### Example: Using the Router
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vicaniddouglas/js_aide",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "description": "A versatile collection of modular JavaScript utility helpers designed to streamline single-page application (SPA) development and general web programming tasks.",
5
5
  "main": "dist/js_aide.cjs.js",
6
6
  "module": "dist/js_aide.esm.js",