@rzl-zone/utils-js 3.3.0 â 3.3.1
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 +71 -38
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
đ <strong>Rzl Utility JS</strong> đ<br/>
|
|
7
|
-
A lightweight, modern TypeScript utility library for Node.js & browser (via bundlers like Webpack/Vite)
|
|
8
|
-
Provides reusable helpers to simplify your JavaScript or TypeScript projects
|
|
9
|
-
<strong>Built with â¤ī¸ by <a href="https://github.com/rzl-app" target="_blank" rel="nofollow noreferrer noopener">@rzl-app</a>.</strong>
|
|
6
|
+
đ <strong><u>Rzl Utility JS</u></strong> đ<br/>
|
|
7
|
+
<i>A lightweight, modern TypeScript utility library for Node.js & browser (via bundlers like Webpack/Vite).</i><br/>
|
|
8
|
+
<i>Provides reusable helpers to simplify your JavaScript or TypeScript projects.</i><br/>
|
|
9
|
+
<strong><i>Built with â¤ī¸ by <a href="https://github.com/rzl-app" target="_blank" rel="nofollow noreferrer noopener">@rzl-app</a>.</i></strong>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<div align="center">
|
|
@@ -39,13 +39,15 @@ Provides reusable helpers to simplify your JavaScript or TypeScript projects.<br
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
-
<h2 id="table-of-contents">đ Table of Contents</h2>
|
|
42
|
+
<h2 id="table-of-contents">đ <strong>Table of Contents</strong></h2>
|
|
43
43
|
|
|
44
44
|
- đģ [Requirements](#requirements)
|
|
45
45
|
- âī¸ [Installation](#installation)
|
|
46
46
|
- ⨠[Features](#features)
|
|
47
47
|
- đ§Ŧ [NextJS Support](#nextjs-support)
|
|
48
48
|
- đ [Detailed Features](#detailed-features)
|
|
49
|
+
- [Full documentation](#full-documentation-rzl-utilsjs-is-currently-under-construction-%EF%B8%8F)
|
|
50
|
+
- [Hint Autocomplete](#hint-autocomplete)
|
|
49
51
|
- đĨ [Usage](#usage)
|
|
50
52
|
- â¤ī¸ [Sponsor](#sponsor-this-package)
|
|
51
53
|
- đ [Changelog](#changelog)
|
|
@@ -56,35 +58,35 @@ Provides reusable helpers to simplify your JavaScript or TypeScript projects.<br
|
|
|
56
58
|
|
|
57
59
|
---
|
|
58
60
|
|
|
59
|
-
<h2 id="requirements">đģ Requirements</h2>
|
|
61
|
+
<h2 id="requirements">đģ <strong>Requirements</strong></h2>
|
|
60
62
|
|
|
61
63
|
- **Node.js `âĨ16.0.0`**
|
|
62
64
|
This package leverages modern JavaScript & TypeScript features that require Node.js version 16.0.0 if not using Next.js, and for Next.js it must follow the official minimum Node.js version requirement depending on the version you use.
|
|
63
65
|
- đ See official Next.js documentation:
|
|
64
|
-
<a href="https://nextjs.org/docs/getting-started/installation#system-requirements" target="_blank" rel="nofollow noreferrer noopener">NextJS Installation Requirements
|
|
66
|
+
<a href="https://nextjs.org/docs/getting-started/installation#system-requirements" target="_blank" rel="nofollow noreferrer noopener"><i>NextJS Installation Requirements.</i></a>
|
|
65
67
|
|
|
66
|
-
- Works with
|
|
68
|
+
- **Works with:**
|
|
67
69
|
- â
Node.js (16.0.0+) - Without NextJS
|
|
68
70
|
- â
Node.js (18.17.0, or higher depending on NextJS version) - With NextJS
|
|
69
71
|
- â
Modern browsers (via bundlers like Webpack / Vite)
|
|
70
72
|
|
|
71
73
|
---
|
|
72
74
|
|
|
73
|
-
<h2 id="installation">âī¸ Installation</h2>
|
|
75
|
+
<h2 id="installation">âī¸ <strong>Installation</strong></h2>
|
|
74
76
|
|
|
75
|
-
#### With NPM
|
|
77
|
+
#### *With NPM*
|
|
76
78
|
|
|
77
79
|
```bash
|
|
78
80
|
npm install @rzl-zone/utils-js
|
|
79
81
|
```
|
|
80
82
|
|
|
81
|
-
#### With Yarn
|
|
83
|
+
#### *With Yarn*
|
|
82
84
|
|
|
83
85
|
```bash
|
|
84
86
|
yarn add @rzl-zone/utils-js
|
|
85
87
|
```
|
|
86
88
|
|
|
87
|
-
#### With PNPM
|
|
89
|
+
#### *With PNPM*
|
|
88
90
|
|
|
89
91
|
```bash
|
|
90
92
|
pnpm add @rzl-zone/utils-js
|
|
@@ -92,7 +94,7 @@ Provides reusable helpers to simplify your JavaScript or TypeScript projects.<br
|
|
|
92
94
|
|
|
93
95
|
---
|
|
94
96
|
|
|
95
|
-
<h2 id="features">⨠Features</h2>
|
|
97
|
+
<h2 id="features">⨠<strong>Features</strong></h2>
|
|
96
98
|
|
|
97
99
|
- đ Written in **TypeScript** â fully typed & safe
|
|
98
100
|
- ⥠Small, tree-shakable & fast
|
|
@@ -103,9 +105,9 @@ Provides reusable helpers to simplify your JavaScript or TypeScript projects.<br
|
|
|
103
105
|
|
|
104
106
|
---
|
|
105
107
|
|
|
106
|
-
<h2 id="nextjs-support">đ§Ŧ Next.js Support</h2>
|
|
108
|
+
<h2 id="nextjs-support">đ§Ŧ <strong>Next.js Support</strong></h2>
|
|
107
109
|
|
|
108
|
-
This package also provides utilities specially built for Next.js environments, neatly separated into their own entry points
|
|
110
|
+
**This package also provides utilities specially built for Next.js environments, neatly separated into their own entry points:**
|
|
109
111
|
|
|
110
112
|
- <h3 id="nextjs-support--globals">`@rzl-zone/utils-js/next`</h3>
|
|
111
113
|
Helpers for building URLs, generating dynamic routes, reading environment variables, etc.
|
|
@@ -125,9 +127,9 @@ This package also provides utilities specially built for Next.js environments, n
|
|
|
125
127
|
|
|
126
128
|
---
|
|
127
129
|
|
|
128
|
-
<h2 id="detailed-features">đ Detailed Features</h2>
|
|
130
|
+
<h2 id="detailed-features">đ <strong>Detailed Features</strong></h2>
|
|
129
131
|
|
|
130
|
-
### Full documentation <a href="https://docs-rzl-utils-js.vercel.app" target="_blank" rel="nofollow noreferrer noopener">Rzl UtilsJS</a> is **currently under construction**
|
|
132
|
+
### **Full documentation <a href="https://docs-rzl-utils-js.vercel.app" target="_blank" rel="nofollow noreferrer noopener">Rzl UtilsJS</a> is **currently under construction** đī¸.**
|
|
131
133
|
#### For now, explore the examples or dive into the source â all utilities are documented via **TSDoc** and typed properly.
|
|
132
134
|
|
|
133
135
|
```ts
|
|
@@ -148,7 +150,38 @@ This package also provides utilities specially built for Next.js environments, n
|
|
|
148
150
|
|
|
149
151
|
import type { | } from "@rzl-zone/utils-js/types";
|
|
150
152
|
```
|
|
151
|
-
####
|
|
153
|
+
#### Place your cursor inside { } or after "@rzl-zone/utils-js/{{ | }}" then press Ctrl+Space to see all available functions/types with full TSDoc hints.
|
|
154
|
+
---
|
|
155
|
+
### **Hint: Autocomplete**
|
|
156
|
+
|
|
157
|
+
**To get the best autocomplete hints for folders and files, add the `types` field in your configuration file:**
|
|
158
|
+
|
|
159
|
+
#### # **_TypeScript_**:
|
|
160
|
+
Add this to your `tsconfig.json`:
|
|
161
|
+
```jsonc
|
|
162
|
+
// tsconfig.json
|
|
163
|
+
{
|
|
164
|
+
"compilerOptions": {
|
|
165
|
+
"types": [
|
|
166
|
+
"@rzl-zone/utils-js"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
#### # **_JavaScript_:**
|
|
173
|
+
Add this to your `jsconfig.json`:
|
|
174
|
+
```jsonc
|
|
175
|
+
// jsconfig.json
|
|
176
|
+
{
|
|
177
|
+
"compilerOptions": {
|
|
178
|
+
"types": [
|
|
179
|
+
"@rzl-zone/utils-js"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
>âšī¸ ***Tip:*** *For JS projects, consider adding "checkJs": true for better IntelliSense.*
|
|
152
185
|
|
|
153
186
|
<!-- - <h4 id="detailed-features--assertions">
|
|
154
187
|
Assertions -
|
|
@@ -173,11 +206,11 @@ This package also provides utilities specially built for Next.js environments, n
|
|
|
173
206
|
-->
|
|
174
207
|
---
|
|
175
208
|
|
|
176
|
-
<h2 id="usage">đĨ Usage</h2>
|
|
209
|
+
<h2 id="usage">đĨ <strong>Usage</strong></h2>
|
|
177
210
|
|
|
178
|
-
### Easy to use, just import on your code base
|
|
211
|
+
### **Easy to use, just import on your code base.**
|
|
179
212
|
|
|
180
|
-
#### Example Function Import
|
|
213
|
+
#### *Example Function Import:*
|
|
181
214
|
|
|
182
215
|
```ts
|
|
183
216
|
import { isServer } from "@rzl-zone/utils-js/predicates";
|
|
@@ -186,7 +219,7 @@ console.log(isServer());
|
|
|
186
219
|
// â `true` if running on server-side, `false` if in browser.
|
|
187
220
|
```
|
|
188
221
|
|
|
189
|
-
#### Example Types Helper Import
|
|
222
|
+
#### *Example Types Helper Import:*
|
|
190
223
|
|
|
191
224
|
```ts
|
|
192
225
|
import type { OmitStrict } from "@rzl-zone/utils-js/types";
|
|
@@ -197,46 +230,46 @@ type MyType = OmitStrict<OtherType, "omittingProps">;
|
|
|
197
230
|
|
|
198
231
|
---
|
|
199
232
|
|
|
200
|
-
<h2 id="sponsor-this-package">â¤ī¸ Sponsor this package</h2>
|
|
233
|
+
<h2 id="sponsor-this-package">â¤ī¸ <strong>Sponsor this package</strong></h2>
|
|
201
234
|
|
|
202
|
-
Help support development
|
|
203
|
-
[đ Become a sponsor](https://github.com/sponsors/rzl-app)
|
|
235
|
+
**Help support development:**
|
|
236
|
+
*[đ Become a sponsor](https://github.com/sponsors/rzl-app)*
|
|
204
237
|
|
|
205
238
|
---
|
|
206
239
|
|
|
207
|
-
<h2 id="changelog">đ Changelog</h2>
|
|
240
|
+
<h2 id="changelog">đ <strong>Changelog</strong></h2>
|
|
208
241
|
|
|
209
|
-
See [CHANGELOG](CHANGELOG.md)
|
|
242
|
+
**See [CHANGELOG](CHANGELOG.md).**
|
|
210
243
|
|
|
211
244
|
---
|
|
212
245
|
|
|
213
|
-
<h2 id="contributing">đ¤ Contributing</h2>
|
|
246
|
+
<h2 id="contributing">đ¤ <strong>Contributing</strong></h2>
|
|
214
247
|
|
|
215
|
-
See [CONTRIBUTING](CONTRIBUTING.md)
|
|
248
|
+
**See [CONTRIBUTING](CONTRIBUTING.md).**
|
|
216
249
|
|
|
217
250
|
---
|
|
218
251
|
|
|
219
|
-
<h2 id="security">đ Security</h2>
|
|
252
|
+
<h2 id="security">đ <strong>Security</strong></h2>
|
|
220
253
|
|
|
221
|
-
Please report issues to [rizalvindwiky1998@gmail.com](mailto:rizalvindwiky1998@gmail.com)
|
|
254
|
+
**Please report issues to [rizalvindwiky1998@gmail.com](mailto:rizalvindwiky1998@gmail.com).**
|
|
222
255
|
|
|
223
256
|
---
|
|
224
257
|
|
|
225
|
-
<h2 id="credits">đ Credits</h2>
|
|
258
|
+
<h2 id="credits">đ <strong>Credits</strong></h2>
|
|
226
259
|
|
|
227
|
-
|
|
228
|
-
|
|
260
|
+
**- [Rzl App](https://github.com/rzl-app)**
|
|
261
|
+
**- [All Contributors](../../contributors)**
|
|
229
262
|
|
|
230
263
|
---
|
|
231
264
|
|
|
232
|
-
<h2 id="license">đ License</h2>
|
|
265
|
+
<h2 id="license">đ <strong>License</strong></h2>
|
|
233
266
|
|
|
234
|
-
The MIT License (MIT)
|
|
235
|
-
Please see [License File](LICENSE.md) for more information
|
|
267
|
+
**The MIT License (MIT).**
|
|
268
|
+
*Please see **[License File](LICENSE.md)** for more information.*
|
|
236
269
|
|
|
237
270
|
---
|
|
238
271
|
|
|
239
272
|
â
**Enjoy using `@rzl-zone/utils-js`?**
|
|
240
|
-
Star this repo â and share it with other JavaScript developers
|
|
273
|
+
*Star this repo [â](https://github.com/rzl-zone/utils-js) and share it with other JavaScript developers!*
|
|
241
274
|
|
|
242
275
|
---
|