@vicaniddouglas/js_aide 1.13.1 → 1.13.2
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 +26 -34
- 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
|
-
### `
|
|
14
|
+
### `Validator`
|
|
25
15
|
|
|
26
|
-
A
|
|
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
|
-
### `
|
|
18
|
+
### `Input Handlers`
|
|
29
19
|
|
|
30
|
-
Utilities for enhanced DOM
|
|
20
|
+
Utilities for enhanced DOM interaction, such as restricting input to specific characters, real-time number formatting, and custom select behaviors.
|
|
31
21
|
|
|
32
|
-
### `
|
|
22
|
+
### `HTTP Engine`
|
|
33
23
|
|
|
34
|
-
|
|
24
|
+
A "Zero-Touch" HTTP client built on `sendRequest`. Features automatic retries with exponential backoff, request queuing, and standardized response objects.
|
|
35
25
|
|
|
36
|
-
### `
|
|
26
|
+
### `Dates & Timing`
|
|
37
27
|
|
|
38
|
-
Convenience functions for
|
|
28
|
+
Convenience functions for complex date manipulation, including relative timing (`timeAgo`), `humanizeDate`, and range calculations.
|
|
39
29
|
|
|
40
|
-
### `
|
|
30
|
+
### `File Manager`
|
|
41
31
|
|
|
42
|
-
|
|
32
|
+
Robust utilities for browser-side file handling, including dynamic `DataExporter` for Excel/PDF and secure file upload orchestration.
|
|
43
33
|
|
|
44
|
-
### `
|
|
34
|
+
### `Camera`
|
|
45
35
|
|
|
46
|
-
|
|
36
|
+
Advanced module for interacting with device cameras, allowing image capture and video stream management with a single promise-based API.
|
|
47
37
|
|
|
48
|
-
### `
|
|
38
|
+
### `Figures & Formatting`
|
|
49
39
|
|
|
50
|
-
|
|
40
|
+
Specialized formatting for financial data. Includes native support for **UGX** (Ugandan Shilling) currency defaults and abbreviated large numbers.
|
|
51
41
|
|
|
52
|
-
### `
|
|
42
|
+
### `Dependency Manager`
|
|
53
43
|
|
|
54
|
-
A
|
|
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
|
-
### `
|
|
46
|
+
### `WebSocket Client`
|
|
57
47
|
|
|
58
|
-
A professional-grade WebSocket
|
|
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 {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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.
|
|
3
|
+
"version": "1.13.2",
|
|
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",
|