js-utils-kit 0.2.3 → 0.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 CHANGED
@@ -2,20 +2,22 @@
2
2
 
3
3
  [![img](https://capsule-render.vercel.app/api?type=waving&height=300&color=gradient&text=Js%20Utils%20Kit&section=footer&desc=Modular%20JavaScript%20utilities%20with%20type%20support%20for%20strings,%20objects,%20arrays,%20and%20more&descAlign=49&descAlignY=72&animation=fadeIn&textBg=false)](https://github.com/TenEplaysOfficial/js-utils-kit)
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/js-utils-kit.svg?style=for-the-badge)](https://www.npmjs.com/package/js-utils-kit)
6
- [![License](https://img.shields.io/github/license/TenEplaysOfficial/js-utils-kit.svg?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit/blob/main/LICENSE)
7
- [![Bundle size](https://img.shields.io/bundlephobia/minzip/js-utils-kit?style=for-the-badge)](https://bundlephobia.com/package/js-utils-kit)
8
- [![Build](https://img.shields.io/github/actions/workflow/status/TenEplaysOfficial/js-utils-kit/weekly-release.yml?label=Build&style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit)
9
- [![GitHub stars](https://img.shields.io/github/stars/TenEplaysOfficial/js-utils-kit?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit/stargazers)
10
- [![Issues](https://img.shields.io/github/issues/TenEplaysOfficial/js-utils-kit?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit/issues)
11
- [![PRs](https://img.shields.io/github/issues-pr/TenEplaysOfficial/js-utils-kit?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit/pulls)
12
- [![Last Commit](https://img.shields.io/github/last-commit/TenEplaysOfficial/js-utils-kit?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit/commits)
13
- [![Discussions](https://img.shields.io/github/discussions/TenEplaysOfficial/js-utils-kit?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit/discussions)
14
- [![Downloads](https://img.shields.io/npm/dm/js-utils-kit?style=for-the-badge)](https://www.npmjs.com/package/js-utils-kit)
15
- [![GitHub repo size](https://img.shields.io/github/repo-size/TenEplaysOfficial/js-utils-kit?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit)
16
- [![Type Support](https://img.shields.io/badge/type-support-blue?style=for-the-badge)](https://github.com/TenEplaysOfficial/js-utils-kit)
17
- [![Sponsor](https://img.shields.io/badge/funding-sponsor-yellow?style=for-the-badge)](https://github.com/sponsors/TenEplaysOfficial)
18
- [![Follow @teneplays on X](https://img.shields.io/badge/follow-@teneplays-fff?logo=x&style=for-the-badge)](https://x.com/teneplays)
5
+ [![Build](https://github.com/teneplaysofficial/js-utils-kit/actions/workflows/publish.yml/badge.svg)](https://github.com/TenEplaysOfficial/js-utils-kit)
6
+ [![npm version](https://img.shields.io/npm/v/js-utils-kit.svg)](https://www.npmjs.com/package/js-utils-kit)
7
+ [![JSR](https://jsr.io/badges/@tene/js-utils-kit)](https://jsr.io/@tene/js-utils-kit)
8
+ [![JSR Score](https://jsr.io/badges/@tene/js-utils-kit/score)](https://jsr.io/@tene/js-utils-kit)
9
+ [![License](https://img.shields.io/github/license/TenEplaysOfficial/js-utils-kit.svg)](https://github.com/TenEplaysOfficial/js-utils-kit/blob/main/LICENSE)
10
+ [![Bundle size](https://img.shields.io/bundlephobia/minzip/js-utils-kit)](https://bundlephobia.com/package/js-utils-kit)
11
+ [![GitHub stars](https://img.shields.io/github/stars/TenEplaysOfficial/js-utils-kit)](https://github.com/TenEplaysOfficial/js-utils-kit/stargazers)
12
+ [![Issues](https://img.shields.io/github/issues/TenEplaysOfficial/js-utils-kit)](https://github.com/TenEplaysOfficial/js-utils-kit/issues)
13
+ [![PRs](https://img.shields.io/github/issues-pr/TenEplaysOfficial/js-utils-kit)](https://github.com/TenEplaysOfficial/js-utils-kit/pulls)
14
+ [![Last Commit](https://img.shields.io/github/last-commit/TenEplaysOfficial/js-utils-kit)](https://github.com/TenEplaysOfficial/js-utils-kit/commits)
15
+ [![Discussions](https://img.shields.io/github/discussions/TenEplaysOfficial/js-utils-kit)](https://github.com/TenEplaysOfficial/js-utils-kit/discussions)
16
+ [![Downloads](https://img.shields.io/npm/dm/js-utils-kit)](https://www.npmjs.com/package/js-utils-kit)
17
+ [![GitHub repo size](https://img.shields.io/github/repo-size/TenEplaysOfficial/js-utils-kit)](https://github.com/TenEplaysOfficial/js-utils-kit)
18
+ [![Type Support](https://img.shields.io/badge/type-support-blue)](https://github.com/TenEplaysOfficial/js-utils-kit)
19
+ [![Sponsor](https://img.shields.io/badge/funding-sponsor-yellow)](https://github.com/sponsors/TenEplaysOfficial)
20
+ [![Follow @teneplays on X](https://img.shields.io/badge/follow-@teneplays-fff?logo=x)](https://x.com/teneplays)
19
21
 
20
22
  </div>
21
23
 
@@ -28,9 +30,26 @@ This package includes utilities designed for both browser and Node.js environmen
28
30
  ## Installation
29
31
 
30
32
  ```sh
31
- yarn add js-utils-kit
32
- # or
33
+ # via npm
33
34
  npm install js-utils-kit
35
+
36
+ # via yarn
37
+ yarn add js-utils-kit
38
+
39
+ # via pnpm
40
+ pnpm add js-utils-kit
41
+
42
+ # via bun
43
+ bun add js-utils-kit
44
+
45
+ # via Deno (using npm)
46
+ deno add npm:js-utils-kit
47
+
48
+ # via Deno (using JSR)
49
+ deno add jsr:@tene/js-utils-kit
50
+
51
+ # via JSR
52
+ npx jsr add @tene/js-utils-kit
34
53
  ```
35
54
 
36
55
  ## Usage
@@ -77,6 +96,20 @@ console.log(string.capitalize('js-utils-kit')); // 'Js-utils-kit'
77
96
  console.log(env.isDev()); // true/false
78
97
  ```
79
98
 
99
+ ### Using JSR or Deno
100
+
101
+ ```ts
102
+ import { number, string, env } from '@tene/js-utils-kit';
103
+ // or
104
+ import { number, string, env } from 'jsr:@tene/js-utils-kit';
105
+ // or
106
+ import number from '@tene/js-utils-kit/number';
107
+ import string from '@tene/js-utils-kit/string';
108
+ import array from '@tene/js-utils-kit/array';
109
+ import object from '@tene/js-utils-kit/object';
110
+ import env from '@tene/js-utils-kit/env';
111
+ ```
112
+
80
113
  ### CommonJS Usage
81
114
 
82
115
  ```js
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../validate-BKQ-HFTd.js"),e={isArray:r.isArray};exports.isArray=r.isArray,exports.default=e;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Checks if a value is a defined array.
3
+ * @param value - The value to check.
4
+ * @returns True if the value is a defined array, false otherwise.
5
+ * @example
6
+ * ```ts
7
+ * console.log(isArray([1, 2, 3])); // true
8
+ * console.log(isArray([])); // true
9
+ * console.log(isArray({})); // false
10
+ * console.log(isArray(null)); // false
11
+ * console.log(isArray(undefined)); // false
12
+ * console.log(isArray("hello")); // false
13
+ * ```
14
+ */
15
+ declare function isArray<T>(value: T): boolean;
16
+
17
+ declare const _default: {
18
+ isArray: typeof isArray;
19
+ };
20
+
21
+ export { _default as default, isArray };
@@ -0,0 +1 @@
1
+ import{i as a}from"../validate-D9J7otjc.js";var r={isArray:a};export{r as default,a as isArray};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generates an array of lowercase ASCII alphabet characters (a–z).
3
3
  *
4
- * @returns {string[]} An array containing 'a' to 'z'.
4
+ * @returns An array containing 'a' to 'z'.
5
5
  * @example
6
6
  * lowercase(); // ['a', 'b', ..., 'z']
7
7
  */
@@ -9,7 +9,7 @@ declare const lowercase: () => string[];
9
9
  /**
10
10
  * Generates an array of uppercase ASCII alphabet characters (A–Z).
11
11
  *
12
- * @returns {string[]} An array containing 'A' to 'Z'.
12
+ * @returns An array containing 'A' to 'Z'.
13
13
  * @example
14
14
  * uppercase(); // ['A', 'B', ..., 'Z']
15
15
  */
@@ -17,7 +17,7 @@ declare const uppercase: () => string[];
17
17
  /**
18
18
  * Generates an array of ASCII digit characters (0–9).
19
19
  *
20
- * @returns {string[]} An array containing '0' to '9'.
20
+ * @returns An array containing '0' to '9'.
21
21
  * @example
22
22
  * digits(); // ['0', '1', ..., '9']
23
23
  */
@@ -25,7 +25,7 @@ declare const digits: () => string[];
25
25
  /**
26
26
  * Combines lowercase, uppercase, and digit characters into a single array.
27
27
  *
28
- * @returns {string[]} An array containing 'a'–'z', 'A'–'Z', and '0'–'9'.
28
+ * @returns An array containing 'a'–'z', 'A'–'Z', and '0'–'9'.
29
29
  * @example
30
30
  * all(); // ['a', ..., 'z', 'A', ..., 'Z', '0', ..., '9']
31
31
  */